Deploy Ubuntu 12.04 Precise Pangolin Discussion
hi i got one more error. while seeding, can you tell my i am seeing this... do i need to start redis-server in production server too?
2014-05-30T18:17:32Z 20938 TID-14fa9g INFO: Sidekiq client with redis options {}
rake aborted!
Error connecting to Redis on 127.0.0.1:6379 (ECONNREFUSED)
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/redis-3.0.6/lib/redis/client.rb:278:in `rescue in establish_connection'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/redis-3.0.6/lib/redis/client.rb:273:in `establish_connection'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/redis-3.0.6/lib/redis/client.rb:69:in `connect'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/redis-3.0.6/lib/redis/client.rb:292:in `ensure_connected'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/redis-3.0.6/lib/redis/client.rb:179:in `block in process'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/redis-3.0.6/lib/redis/client.rb:258:in `logging'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/redis-3.0.6/lib/redis/client.rb:178:in `process'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/redis-3.0.6/lib/redis/client.rb:149:in `call_pipelined'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/redis-3.0.6/lib/redis/client.rb:121:in `block in call_pipeline'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/redis-3.0.6/lib/redis/client.rb:245:in `with_reconnect'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/redis-3.0.6/lib/redis/client.rb:119:in `call_pipeline'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/redis-3.0.6/lib/redis.rb:2093:in `block in multi'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/redis-3.0.6/lib/redis.rb:36:in `block in synchronize'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/redis-3.0.6/lib/redis.rb:36:in `synchronize'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/redis-3.0.6/lib/redis.rb:2085:in `multi'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/sidekiq-2.17.0/lib/sidekiq/client.rb:159:in `block in raw_push'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/connection_pool-1.2.0/lib/connection_pool.rb:55:in `with'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/sidekiq-2.17.0/lib/sidekiq.rb:67:in `redis'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/sidekiq-2.17.0/lib/sidekiq/client.rb:150:in `raw_push'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/sidekiq-2.17.0/lib/sidekiq/client.rb:50:in `push'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/sidekiq-2.17.0/lib/sidekiq/client.rb:98:in `push'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/sidekiq-2.17.0/lib/sidekiq/worker.rb:83:in `client_push'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/sidekiq-2.17.0/lib/sidekiq/worker.rb:40:in `perform_async'
/home/deploy/silcom/releases/20140530162625/app/observers/user_observer.rb:10:in `after_create'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/rails-observers-0.1.2/lib/rails/observers/active_model/observing.rb:352:in `update'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/rails-observers-0.1.2/lib/rails/observers/activerecord/observer.rb:118:in `block (2 levels) in define_callbacks'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:454:in `_run__319964337__create__callbacks'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:80:in `run_callbacks'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/callbacks.rb:306:in `create_record'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/timestamp.rb:57:in `create_record'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/persistence.rb:477:in `create_or_update'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/callbacks.rb:302:in `block in create_or_update'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:413:in `_run__319964337__save__callbacks'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:80:in `run_callbacks'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/callbacks.rb:302:in `create_or_update'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/persistence.rb:128:in `save!'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/validations.rb:57:in `save!'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/attribute_methods/dirty.rb:41:in `save!'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:275:in `block in save!'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:326:in `block in with_transaction_returning_status'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:200:in `transaction'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:209:in `transaction'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:323:in `with_transaction_returning_status'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:275:in `save!'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:487:in `block in save!'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:502:in `block (2 levels) in around_save'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:150:in `block in run_actions'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:170:in `catch_exceptions'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:148:in `run_actions'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:133:in `run_callbacks'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:212:in `run_callbacks'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:63:in `block (2 levels) in perform'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:63:in `catch'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:63:in `block in perform'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:186:in `within_transaction'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/transition_collection.rb:62:in `perform'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:502:in `block in around_save'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:530:in `block in transaction'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `block in transaction'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:210:in `within_new_transaction'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `transaction'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:209:in `transaction'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:529:in `transaction'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:501:in `around_save'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/state_machine-1.2.0/lib/state_machine/integrations/active_record.rb:487:in `save!'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/protected_attributes-1.0.5/lib/active_record/mass_assignment_security/validations.rb:17:in `create!'
/home/deploy/silcom/releases/20140530162625/db/seeds.rb:135:in `<top (required)="">'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `block in load'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/railties-4.0.2/lib/rails/engine.rb:540:in `load_seed'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/tasks/database_tasks.rb:154:in `load_seed'
/home/deploy/silcom/shared/bundle/ruby/2.1.0/gems/activerecord-4.0.2/lib/active_record/railties/databases.rake:181:in `block (2 levels) in <top (required)="">'
Tasks: TOP => db:seed
(See full trace by running task with --trace)
Thanks Chris - your tutorial is simply awesome. It's the clearest I could find.
I have an issue though. I followed the tutorial and the deployment was successful. Yet I can't see the app. I can see the Nginx start page at the IP of my droplet (http://5.101.99.81/) but I can't see the app. Locally I see it at localhost:3000/todos but nothing of that sort can be seen at the DO instance. The only place I deviated from your tutorial was at the /etc/nginx/sites-enabled/default.Instead of using server_name mydomain.com; I used the IP address: server_name 5.101.99.81; as I haven't registered the domain yet. Do you think that this is the cause? If not - what else could be wrong?
That would be a problem with your nginx config. The IP address doesn't matter, it's okay to serve up on that instead of a domain. You may have changed the config and not restarted nginx or you did and it was invalid and nginx didn't actually load it. Double check that and the /var/log/nginx/error.log file to see if you have anything wrong there.
Thank you for the great tutorial. I feel a lot more comfortable with Capistrano.
I'm struggling somewhat with Passenger:
"Ruby (Rack) application could not be started"
It cites a problem with the Gemfile ("There was an error in your Gemfile, and Bundler cannot continue. (Bundler::GemfileError)")
And in the Backtrace, it points to an old version of Ruby I had installed on there:
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/bundler-1.1.5/lib/bundler/dsl.rb12in `evaluate'
Any idea how to get Passenger to stop using REE? I have a feeling it's simply an old version of Bundler that is struggling with my more current Gemfile.
Make sure your passenger_ruby line in nginx.conf points to the right location. I think if that fails, it probably falls back to whatever is in your PATH which could be an older version like REE.