Skip to content

Instantly share code, notes, and snippets.

@MIsabelZM
MIsabelZM / gist:3e5309dc24c1bf8e9536
Created November 26, 2015 17:08
Error Spring Client
Error: There is a version mismatch between the spring client ande the server
Solution:
spring stop
bundle
spring start
#If seconds(x) are less than 86400 (Seconds per day)
Time.at(x).utc.strftime("%H:%M:%S")
@MIsabelZM
MIsabelZM / gist:2f8a52d77bebcde3e429
Created February 18, 2015 15:15
unicorn_heroku.rb
run_sidekiq_in_this_thread = %w(staging).include?(ENV['RAILS_ENV'])
worker_processes (run_sidekiq_in_this_thread ? 2 : 3)
@sidekiq_pid = nil
before_fork do |server, worker|
if run_sidekiq_in_this_thread
@resque_pid ||= spawn("bundle exec sidekiq -c 2")
Rails.logger.info('Spawned sidekiq #{@request_pid}')
end
@MIsabelZM
MIsabelZM / gist:d622880a7557b7a029a0
Created February 13, 2015 23:57
Heroku logs - Error
2015-02-13T23:10:04.182587+00:00 app[web.1]: bin/rails:8:in `require'
2015-02-13T23:10:04.182579+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server'
2015-02-13T23:10:04.182581+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
2015-02-13T23:10:04.182589+00:00 app[web.1]: bin/rails:8:in `<main>'
2015-02-13T23:10:04.182838+00:00 app[web.1]: [2015-02-13 23:10:04] INFO going to shutdown ...
2015-02-13T23:10:05.316547+00:00 heroku[web.1]: Process exited with status 143
2015-02-13T23:10:05.506545+00:00 heroku[web.1]: Starting process with command `bundle exec unicorn -p 21369 -c ./config/unicorn.rb`
2015-02-13T23:10:07.664712+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/bin/unicorn:23:in `load'
2015-02-13T23:10:07.664673+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/unicorn-4.8.3/lib/unicorn/configurator.rb:541:in `working_directory': config_file=./confi
Estoy usando el número de celular que Twilio me habilitó después de crear la cuenta.
Petición:
curl -X POST http://localhost:3000/api/v1/registrations/request_activation_code -d "phone=3004133149"
Error:
Twilio::REST::RequestError: The From phone number +19287233882 is not a valid, SMS-capable inbound phone number or short code for your account.
Es necesario comprar un 'short code' o hacer alguna configuraciín en especial?
@MIsabelZM
MIsabelZM / gist:6c7477156958e2027ca3
Last active January 13, 2017 21:16
Fix PG::ConnectionBad error

Error
could not connect to server: No such file or directory (PG::ConnectionBad) Is the server running locally and accepting connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

Solution
Run this commands
$ gem uninstall pg
$ cd my-rails-app/
$ bundle install

@MIsabelZM
MIsabelZM / SassMeister-input.scss
Created October 28, 2014 22:02
Generated by SassMeister.com.
// ----
// Sass (v3.4.6)
// Compass (v1.0.1)
// ----
//variables
$color-fondo:orange;
$padding:10px;
//parent selectors
agent.get('http://www.gild.com/')
=> #<Mechanize::Page
{url #<URI::HTTP:0x007fcc960f9c58 URL:http://www.gild.com/>}
{meta_refresh}
{title
"Gild Talent Acquisition Software - Developers for Hire - Tech Recruiting"}
{iframes}
{frames}
{links
#<Mechanize::Page::Link