Please see update at bottom
I'm trying to use the 'delayed_jobs' gem in my project. I got everything working in my local environment, however when I moved the project to production on Heroku I was unable to 'rake db:migrate', and am not able to get my server started. Here are the steps I followed.
*Run bundle_install with 'delayed_job' and 'delayed_job_active_record' in my gem file
*I did not run 'ails generate delayed_job:active_record' as the migration file was moved to the server from when I ran 'ails generate delayed_job:active_record' in DEV
*I ran rake db:migrate and it failed with the following error, not sure how to fix. (Note: It appears that the migration is failing due to the table not existing, which is a big issue as I need to run the migration to create the table).
[?25l[?25hUnable to write PID file to /app/tmp/pids/delayed_job.pid
[ActiveJob] Enqueued SquareOrderCleanupJob (Job ID: c364f5c1-a3c3-401a-95a6-a567a2813942) to DelayedJob(default) at 2016-06-04 14:57:56 UTC
[ActiveJob] Mysql2::Error: Table 'heroku_fc2daea183dcdd6.delayed_jobs' doesn't exist: SHOW FULL FIELDS FROM `delayed_jobs`
rake aborted!
ActiveRecord::StatementInvalid: Mysql2::Error: Table 'heroku_fc2daea183dcdd6.delayed_jobs' doesn't exist: SHOW FULL FIELDS FROM `delayed_jobs`
/app/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:80:in `_query'
/app/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:80:in `block in query'
/app/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:79:in `handle_interrupt'
/app/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:79:in `query'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:305:in `block in execute'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:305:in `execute'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/mysql2_adapter.rb:231:in `execute'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:312:in `execute_and_free'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:457:in `columns'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/schema_cache.rb:43:in `columns'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/attributes.rb:93:in `columns'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/attributes.rb:98:in `columns_hash'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/inheritance.rb:205:in `subclass_from_attributes?'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/inheritance.rb:54:in `new'
/app/vendor/bundle/ruby/2.2.0/gems/delayed_job-4.1.2/lib/delayed/backend/base.rb:16:in `enqueue_job'
/app/vendor/bundle/ruby/2.2.0/gems/delayed_job-4.1.2/lib/delayed/backend/base.rb:12:in `enqueue'
/app/vendor/bundle/ruby/2.2.0/gems/activejob-4.2.3/lib/active_job/queue_adapters/delayed_job_adapter.rb:22:in `enqueue_at'
/app/vendor/bundle/ruby/2.2.0/gems/activejob-4.2.3/lib/active_job/enqueuing.rb:69:in `block in enqueue'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:115:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:115:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:553:in `block (2 levels) in compile'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:503:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:503:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:496:in `block (2 levels) in around'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:341:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:341:in `block (2 levels) in simple'
/app/vendor/bundle/ruby/2.2.0/gems/activejob-4.2.3/lib/active_job/logging.rb:14:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activejob-4.2.3/lib/active_job/logging.rb:14:in `block (3 levels) in '
/app/vendor/bundle/ruby/2.2.0/gems/activejob-4.2.3/lib/active_job/logging.rb:43:in `block in tag_logger'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/tagged_logging.rb:68:in `block in tagged'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/tagged_logging.rb:26:in `tagged'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/tagged_logging.rb:68:in `tagged'
/app/vendor/bundle/ruby/2.2.0/gems/activejob-4.2.3/lib/active_job/logging.rb:43:in `tag_logger'
/app/vendor/bundle/ruby/2.2.0/gems/activejob-4.2.3/lib/active_job/logging.rb:13:in `block (2 levels) in '
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:439:in `instance_exec'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:439:in `block in make_lambda'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:340:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:340:in `block in simple'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:495:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:495:in `block in around'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:503:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:503:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:88:in `run_callbacks'
/app/vendor/bundle/ruby/2.2.0/gems/activejob-4.2.3/lib/active_job/enqueuing.rb:67:in `enqueue'
/app/vendor/bundle/ruby/2.2.0/gems/activejob-4.2.3/lib/active_job/configured_job.rb:13:in `perform_later'
/app/config/initializers/schedule_jobs.rb:2:in `'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `load'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `block in load'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `load'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/engine.rb:652:in `block in load_config_initializer'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications.rb:166:in `instrument'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/engine.rb:651:in `load_config_initializer'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/engine.rb:616:in `block (2 levels) in '
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/engine.rb:615:in `each'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/engine.rb:615:in `block in '
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:30:in `instance_exec'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:30:in `run'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:55:in `block in run_initializers'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:44:in `each'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:44:in `tsort_each_child'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:44:in `each'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:44:in `tsort_each_child'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:54:in `run_initializers'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/application.rb:352:in `initialize!'
/app/config/environment.rb:5:in `'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `block in require'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/application.rb:328:in `require_environment!'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/application.rb:457:in `block in run_tasks_blocks'
Mysql2::Error: Table 'heroku_fc2daea183dcdd6.delayed_jobs' doesn't exist
/app/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:80:in `_query'
/app/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:80:in `block in query'
/app/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:79:in `handle_interrupt'
/app/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.21/lib/mysql2/client.rb:79:in `query'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:305:in `block in execute'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:305:in `execute'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/mysql2_adapter.rb:231:in `execute'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:312:in `execute_and_free'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:457:in `columns'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/schema_cache.rb:43:in `columns'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/attributes.rb:93:in `columns'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/attributes.rb:98:in `columns_hash'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/inheritance.rb:205:in `subclass_from_attributes?'
/app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/inheritance.rb:54:in `new'
/app/vendor/bundle/ruby/2.2.0/gems/delayed_job-4.1.2/lib/delayed/backend/base.rb:16:in `enqueue_job'
/app/vendor/bundle/ruby/2.2.0/gems/delayed_job-4.1.2/lib/delayed/backend/base.rb:12:in `enqueue'
/app/vendor/bundle/ruby/2.2.0/gems/activejob-4.2.3/lib/active_job/queue_adapters/delayed_job_adapter.rb:22:in `enqueue_at'
/app/vendor/bundle/ruby/2.2.0/gems/activejob-4.2.3/lib/active_job/enqueuing.rb:69:in `block in enqueue'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:115:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:115:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:553:in `block (2 levels) in compile'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:503:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:503:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:496:in `block (2 levels) in around'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:341:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:341:in `block (2 levels) in simple'
/app/vendor/bundle/ruby/2.2.0/gems/activejob-4.2.3/lib/active_job/logging.rb:14:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activejob-4.2.3/lib/active_job/logging.rb:14:in `block (3 levels) in '
/app/vendor/bundle/ruby/2.2.0/gems/activejob-4.2.3/lib/active_job/logging.rb:43:in `block in tag_logger'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/tagged_logging.rb:68:in `block in tagged'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/tagged_logging.rb:26:in `tagged'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/tagged_logging.rb:68:in `tagged'
/app/vendor/bundle/ruby/2.2.0/gems/activejob-4.2.3/lib/active_job/logging.rb:43:in `tag_logger'
/app/vendor/bundle/ruby/2.2.0/gems/activejob-4.2.3/lib/active_job/logging.rb:13:in `block (2 levels) in '
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:439:in `instance_exec'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:439:in `block in make_lambda'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:340:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:340:in `block in simple'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:495:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:495:in `block in around'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:503:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:503:in `call'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:88:in `run_callbacks'
/app/vendor/bundle/ruby/2.2.0/gems/activejob-4.2.3/lib/active_job/enqueuing.rb:67:in `enqueue'
/app/vendor/bundle/ruby/2.2.0/gems/activejob-4.2.3/lib/active_job/configured_job.rb:13:in `perform_later'
/app/config/initializers/schedule_jobs.rb:2:in `'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `load'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `block in load'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `load'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/engine.rb:652:in `block in load_config_initializer'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications.rb:166:in `instrument'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/engine.rb:651:in `load_config_initializer'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/engine.rb:616:in `block (2 levels) in '
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/engine.rb:615:in `each'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/engine.rb:615:in `block in '
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:30:in `instance_exec'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:30:in `run'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:55:in `block in run_initializers'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:44:in `each'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:44:in `tsort_each_child'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:44:in `each'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:44:in `tsort_each_child'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/initializable.rb:54:in `run_initializers'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/application.rb:352:in `initialize!'
/app/config/environment.rb:5:in `'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `block in require'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency'
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/application.rb:328:in `require_environment!'
/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/application.rb:457:in `block in run_tasks_blocks'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
[?25h
UPDATE
I figured out the problem was caused by executing the following code at the initialization of my rails app. I was able to get the migration to work by temporarily removing it, and then adding it back in after the migration was complete (the code require the migration to be run before it was run). This is a temporary patch so I am going to work on getting a better solution for future PROD pushes. I'm thinking I can find a way to check if the table exists before running the code, but if anyone knows of a better way please let me know.
system("ruby lib/background_job start")
SquareOrderCleanupJob.set(wait: 10.minute).perform_later()
at_exit do
system("ruby lib/background_job stop")
end
You can check if a table exists, and therefore if migrations have been run:
ActiveRecord::Base.connection.table_exists? 'table_name'
That answer is also in SO here.
Related
I just setup rollbar within my rails app using the rollbar gem, but when running the rake task to test my setup it gives me this error (backtrace appended below).
Started GET "/verify" for at 2017-11-07 01:29:13 +0100
IPAddr::InvalidAddressError: invalid address
Obviously the address is empty and therefore it makes sense, the address is invalid, but i have no clue why this is the case.
The token is correctly set in the environment and within the rollbar dashboard of this project I even see the failed attempt as error.
Further Info: Rails 4.2.4 on ruby 2.2.3
Here is the backtrace, I'd be really happy for any tips!
from /home/user/.rbenv/versions/2.2.3/lib/ruby/2.2.0/ipaddr.rb:559:in `in6_addr'
from /home/user/.rbenv/versions/2.2.3/lib/ruby/2.2.0/ipaddr.rb:496:in `initialize'
from /home/user/.rbenv/versions/2.2.3/lib/ruby/2.2.0/ipaddr.rb:514:in `new'
from /home/user/.rbenv/versions/2.2.3/lib/ruby/2.2.0/ipaddr.rb:514:in `coerce_other'
from /home/user/.rbenv/versions/2.2.3/lib/ruby/2.2.0/ipaddr.rb:170:in `include?'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/web-console-2.3.0/lib/web_console/whitelist.rb:17:in `block in include?'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/web-console-2.3.0/lib/web_console/whitelist.rb:17:in `any?'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/web-console-2.3.0/lib/web_console/whitelist.rb:17:in `include?'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/web-console-2.3.0/lib/web_console/request.rb:16:in `from_whitelited_ip?'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/web-console-2.3.0/lib/web_console/whiny_request.rb:8:in `from_whitelited_ip?'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/web-console-2.3.0/lib/web_console/middleware.rb:20:in `block in call'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/web-console-2.3.0/lib/web_console/middleware.rb:18:in `catch'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/web-console-2.3.0/lib/web_console/middleware.rb:18:in `call'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/rack/logger.rb:38:in `call_app'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/rack/logger.rb:20:in `block in call'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/tagged_logging.rb:68:in `block in tagged'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/tagged_logging.rb:26:in `tagged'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/tagged_logging.rb:68:in `tagged'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/rack/logger.rb:20:in `call'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/request_id.rb:21:in `call'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rack-1.6.5/lib/rack/methodoverride.rb:22:in `call'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rack-1.6.5/lib/rack/runtime.rb:18:in `call'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rack-1.6.5/lib/rack/lock.rb:17:in `call'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/static.rb:116:in `call'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rack-1.6.5/lib/rack/sendfile.rb:113:in `call'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/engine.rb:518:in `call'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/railties-4.2.4/lib/rails/application.rb:165:in `call'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rollbar-2.15.5/lib/rollbar/rake_tasks.rb:86:in `block (2 levels) in <top (required)>'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `call'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `block in execute'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `each'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
from /home/user/.rbenv/versions/2.2.3/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:152:in `invoke_task'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `each'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block in top_level'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:117:in `run_with_threads'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:102:in `top_level'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:80:in `block in run'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
from /var/www/project/vendor/bundle/ruby/2.2.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
from /var/www/project/vendor/bundle/ruby/2.2.0/bin/rake:23:in `load'
from /var/www/project/vendor/bundle/ruby/2.2.0/bin/rake:23:in `<top (required)>'
from /home/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/cli/exec.rb:74:in `load'
from /home/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/cli/exec.rb:74:in `kernel_load'
from /home/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/cli/exec.rb:27:in `run'
from /home/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/cli.rb:335:in `exec'
from /home/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /home/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
from /home/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
from /home/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/cli.rb:20:in `dispatch'
from /home/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
from /home/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/cli.rb:11:in `start'
from /home/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/exe/bundle:32:in `block in <top (required)>'
from /home/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
from /home/user/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bundler-1.14.3/exe/bundle:24:in `<top (required)>'
from /home/user/.rbenv/versions/2.2.3/bin/bundle:23:in `load'
from /home/user/.rbenv/versions/2.2.3/bin/bundle:23:in `<main>'
I just ran into this myself. It seems to be a semi-known issue with Rollbar: https://github.com/rollbar/rollbar-gem/issues/541. I can confirm that removing the web-console gem (which I wasn't using anyway) from my Gemfile fixed the problem for me.
Now I am using Ruby on Rails framework. We use delayed_job to run a job to operate aws s3 file by aws-sdk. We deal with many files on aws s3.
When we run the job, we got this error:
e.message => Access Denied
e.backtrace.join("\n") =>
/app/shared/bundle/ruby/2.3.0/gems/aws-sdk-core-2.5.2/lib/seahorse/client/plugins/raise_response_errors.rb:15:in `call'
/app/shared/bundle/ruby/2.3.0/gems/aws-sdk-core-2.5.2/lib/aws-sdk-core/plugins/s3_sse_cpk.rb:19:in `call'
/app/shared/bundle/ruby/2.3.0/gems/aws-sdk-core-2.5.2/lib/aws-sdk-core/plugins/s3_accelerate.rb:33:in `call'
/app/shared/bundle/ruby/2.3.0/gems/aws-sdk-core-2.5.2/lib/aws-sdk-core/plugins/param_converter.rb:20:in `call'
/app/shared/bundle/ruby/2.3.0/gems/aws-sdk-core-2.5.2/lib/aws-sdk-core/plugins/response_paging.rb:26:in `call'
/app/shared/bundle/ruby/2.3.0/gems/aws-sdk-core-2.5.2/lib/seahorse/client/plugins/response_target.rb:21:in `call'
/app/shared/bundle/ruby/2.3.0/gems/aws-sdk-core-2.5.2/lib/seahorse/client/request.rb:70:in `send_request'
/app/shared/bundle/ruby/2.3.0/gems/aws-sdk-core-2.5.2/lib/seahorse/client/base.rb:207:in `block (2 levels) in define_operation_methods'
/app/shared/bundle/ruby/2.3.0/gems/aws-sdk-resources-2.5.2/lib/aws-sdk-resources/request.rb:24:in `call'
/app/shared/bundle/ruby/2.3.0/gems/aws-sdk-resources-2.5.2/lib/aws-sdk-resources/operations.rb:139:in `all_batches'
/app/shared/bundle/ruby/2.3.0/gems/aws-sdk-resources-2.5.2/lib/aws-sdk-resources/collection.rb:18:in `each'
/app/shared/bundle/ruby/2.3.0/gems/aws-sdk-resources-2.5.2/lib/aws-sdk-resources/collection.rb:18:in `each'
/app/releases/20161107014751/app/jobs/my_job.rb:35:in `perform'
/app/shared/bundle/ruby/2.3.0/gems/activejob-5.0.0/lib/active_job/execution.rb:34:in `block in perform_now'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:126:in `call'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:455:in `call'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:448:in `block (2 levels) in around'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:286:in `block (2 levels) in halting'
/app/shared/bundle/ruby/2.3.0/gems/i18n-0.7.0/lib/i18n.rb:257:in `with_locale'
/app/shared/bundle/ruby/2.3.0/gems/activejob-5.0.0/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:391:in `instance_exec'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:391:in `block in make_lambda'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:285:in `block in halting'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:447:in `block in around'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:455:in `call'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:448:in `block (2 levels) in around'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:286:in `block (2 levels) in halting'
/app/shared/bundle/ruby/2.3.0/gems/activejob-5.0.0/lib/active_job/logging.rb:24:in `block (4 levels) in <module:Logging>'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/notifications.rb:164:in `block in instrument'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/notifications.rb:164:in `instrument'
/app/shared/bundle/ruby/2.3.0/gems/activejob-5.0.0/lib/active_job/logging.rb:23:in `block (3 levels) in <module:Logging>'
/app/shared/bundle/ruby/2.3.0/gems/activejob-5.0.0/lib/active_job/logging.rb:44:in `block in tag_logger'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/tagged_logging.rb:70:in `block in tagged'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/tagged_logging.rb:26:in `tagged'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/tagged_logging.rb:70:in `tagged'
/app/shared/bundle/ruby/2.3.0/gems/activejob-5.0.0/lib/active_job/logging.rb:44:in `tag_logger'
/app/shared/bundle/ruby/2.3.0/gems/activejob-5.0.0/lib/active_job/logging.rb:20:in `block (2 levels) in <module:Logging>'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:391:in `instance_exec'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:391:in `block in make_lambda'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:285:in `block in halting'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:447:in `block in around'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:455:in `call'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:101:in `__run_callbacks__'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:750:in `_run_perform_callbacks'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:90:in `run_callbacks'
/app/shared/bundle/ruby/2.3.0/gems/activejob-5.0.0/lib/active_job/execution.rb:33:in `perform_now'
/app/shared/bundle/ruby/2.3.0/gems/activejob-5.0.0/lib/active_job/execution.rb:22:in `block in execute'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:126:in `call'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:455:in `call'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:448:in `block (2 levels) in around'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:286:in `block (2 levels) in halting'
/app/shared/bundle/ruby/2.3.0/gems/activejob-5.0.0/lib/active_job/railtie.rb:26:in `block (4 levels) in <class:Railtie>'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/execution_wrapper.rb:76:in `wrap'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/reloader.rb:68:in `block in wrap'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/execution_wrapper.rb:76:in `wrap'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/reloader.rb:67:in `wrap'
/app/shared/bundle/ruby/2.3.0/gems/activejob-5.0.0/lib/active_job/railtie.rb:25:in `block (3 levels) in <class:Railtie>'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:391:in `instance_exec'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:391:in `block in make_lambda'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:285:in `block in halting'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:447:in `block in around'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:455:in `call'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:101:in `__run_callbacks__'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:750:in `_run_execute_callbacks'
/app/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.0/lib/active_support/callbacks.rb:90:in `run_callbacks'
/app/shared/bundle/ruby/2.3.0/gems/activejob-5.0.0/lib/active_job/execution.rb:20:in `execute'
/app/shared/bundle/ruby/2.3.0/gems/activejob-5.0.0/lib/active_job/queue_adapters/delayed_job_adapter.rb:36:in `perform'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/backend/base.rb:84:in `block in invoke_job'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:61:in `block in initialize'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:66:in `execute'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:40:in `run_callbacks'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/backend/base.rb:81:in `invoke_job'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:230:in `block (2 levels) in run'
/usr/lib64/ruby/2.3.0/timeout.rb:91:in `block in timeout'
/usr/lib64/ruby/2.3.0/timeout.rb:101:in `timeout'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:230:in `block in run'
/usr/lib64/ruby/2.3.0/benchmark.rb:308:in `realtime'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:229:in `run'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:306:in `block in reserve_and_run_one_job'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:61:in `block in initialize'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:66:in `execute'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:40:in `run_callbacks'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:306:in `reserve_and_run_one_job'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:213:in `block in work_off'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:212:in `times'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:212:in `work_off'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:175:in `block (4 levels) in start'
/usr/lib64/ruby/2.3.0/benchmark.rb:308:in `realtime'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:174:in `block (3 levels) in start'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:61:in `block in initialize'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:66:in `execute'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:40:in `run_callbacks'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:173:in `block (2 levels) in start'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:172:in `loop'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:172:in `block in start'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/plugins/clear_locks.rb:7:in `block (2 levels) in <class:ClearLocks>'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:79:in `block (2 levels) in add'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:61:in `block in initialize'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:79:in `block in add'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:66:in `execute'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:40:in `run_callbacks'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:171:in `start'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/command.rb:132:in `run'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/command.rb:120:in `block in run_process'
/app/shared/bundle/ruby/2.3.0/gems/daemons-1.2.3/lib/daemons/application.rb:265:in `block in start_proc'
/app/shared/bundle/ruby/2.3.0/gems/daemons-1.2.3/lib/daemons/daemonize.rb:84:in `call_as_daemon'
/app/shared/bundle/ruby/2.3.0/gems/daemons-1.2.3/lib/daemons/application.rb:269:in `start_proc'
/app/shared/bundle/ruby/2.3.0/gems/daemons-1.2.3/lib/daemons/application.rb:295:in `start'
/app/shared/bundle/ruby/2.3.0/gems/daemons-1.2.3/lib/daemons/controller.rb:56:in `run'
/app/shared/bundle/ruby/2.3.0/gems/daemons-1.2.3/lib/daemons.rb:193:in `block in run_proc'
/app/shared/bundle/ruby/2.3.0/gems/daemons-1.2.3/lib/daemons/cmdline.rb:88:in `catch_exceptions'
/app/shared/bundle/ruby/2.3.0/gems/daemons-1.2.3/lib/daemons.rb:192:in `run_proc'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/command.rb:118:in `run_process'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/command.rb:99:in `block in daemonize'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/command.rb:97:in `times'
/app/shared/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/command.rb:97:in `daemonize'
/app/current/bin/delayed_job:5:in `<main>'
I don't know whether it is the delayed_job problem or the aws-sdk problem, or s3 network problem.
For sure its related to AWS not with delayed job , you need to check your s3 creds or contact to them for more details
Reference
http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
I have tried twice to install an installation of RubyMine on a CentOS7 VM. They have now both failed due to a Redis::TimeoutError.
I have received this error when attempting to start the rails server. This happens both through RubyMine and through the Konsole after I start redis through the "service redis start" command.
I can start the rails server fine without starting redis first. And the application works fine (so far) if I start redis after the server starts. However this is only a short term solution as I will be adding automatic start for all services such as redis when my VM starts.
My backtrace
/root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis/connection/ruby.rb:111:in `rescue in _write_to_socket': Connection timed out (Redis::TimeoutError)
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis/connection/ruby.rb:104:in `_write_to_socket'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis/connection/ruby.rb:131:in `block in write'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis/connection/ruby.rb:130:in `loop'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis/connection/ruby.rb:130:in `write'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis/connection/ruby.rb:374:in `write'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis/client.rb:271:in `block in write'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis/client.rb:250:in `io'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis/client.rb:269:in `write'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis/client.rb:228:in `block (3 levels) in process'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis/client.rb:222:in `each'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis/client.rb:222:in `block (2 levels) in process'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis/client.rb:367:in `ensure_connected'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis/client.rb:221:in `block in process'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis/client.rb:306:in `logging'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis/client.rb:220:in `process'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis/client.rb:120:in `call'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/newrelic_rpm-3.16.2.321/lib/new_relic/agent/instrumentation/redis.rb:42:in `block in call'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/newrelic_rpm-3.16.2.321/lib/new_relic/agent/datastores.rb:111:in `wrap'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/newrelic_rpm-3.16.2.321/lib/new_relic/agent/instrumentation/redis.rb:41:in `call'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis.rb:754:in `block in set'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis.rb:58:in `block in synchronize'
from /root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis.rb:58:in `synchronize'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-3.3.2/lib/redis.rb:750:in `set'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-store-1.1.7/lib/redis/store/interface.rb:9:in `set'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-store-1.1.7/lib/redis/store/ttl.rb:8:in `set'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-store-1.1.7/lib/redis/store/marshalling.rb:5:in `block in set'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-store-1.1.7/lib/redis/store/marshalling.rb:29:in `_marshal'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-store-1.1.7/lib/redis/store/marshalling.rb:5:in `set'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-store-1.1.7/lib/redis/store/namespace.rb:5:in `block in set'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-store-1.1.7/lib/redis/store/namespace.rb:74:in `namespace'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-store-1.1.7/lib/redis/store/namespace.rb:5:in `set'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-activesupport-4.1.5/lib/active_support/cache/redis_store.rb:223:in `block in write_entry'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-activesupport-4.1.5/lib/active_support/cache/redis_store.rb:212:in `call'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-activesupport-4.1.5/lib/active_support/cache/redis_store.rb:212:in `with'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-activesupport-4.1.5/lib/active_support/cache/redis_store.rb:223:in `write_entry'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-activesupport-4.1.5/lib/active_support/cache/redis_store.rb:60:in `block in write'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/cache.rb:547:in `block in instrument'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/notifications.rb:166:in `instrument'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/cache.rb:547:in `instrument'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/redis-activesupport-4.1.5/lib/active_support/cache/redis_store.rb:58:in `write'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/st_core-1.5.0.2/lib/st_core/entity_factory/entity_store.rb:105:in `write'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/st_core-1.5.0.2/lib/st_core/entity_factory/entity_store.rb:54:in `store'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/st_core-1.5.0.2/lib/st_core/engine.rb:63:in `block (2 levels) in <class:Engine>'
from /root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/st_core-1.5.0.2/lib/st_core/engine.rb:62:in `block in <class:Engine>'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
from /root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
from /root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
from /root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each'
from /root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `call'
from /root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
from /root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
from /root/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!'
from /root/RubymineProjects/chop/config/environment.rb:5:in `<top (required)>'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
from /root/RubymineProjects/chop/config.ru:3:in `block in <main>'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /root/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
I hava a same problem when I create redis-cluster.Finally,I find the problem.
you should do that:
1、gem uninstall redis
2、gem install redis --version 3.0.0
I am using rails for a quick project. I try to run rake:db migrate after rails g devise User on the command line and I get this error log:
Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/rails/routes.rb:457:in `ensure in with_devise_exclusive_scope': undefined method `merge!' for #<ActionDispatch::Routing::Mapper::Scope:0x007fcbe5e766f8> (NoMethodError)
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/rails/routes.rb:457:in `with_devise_exclusive_scope'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/rails/routes.rb:248:in `block (2 levels) in devise_for'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/rails/routes.rb:351:in `block in devise_scope'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/routing/mapper.rb:940:in `block in constraints'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/routing/mapper.rb:816:in `scope'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/routing/mapper.rb:940:in `constraints'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/rails/routes.rb:350:in `devise_scope'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/rails/routes.rb:247:in `block in devise_for'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/rails/routes.rb:223:in `each'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/devise-3.3.0/lib/devise/rails/routes.rb:223:in `devise_for'
from /Users/ashleighalmeida/Rails-Blog/config/routes.rb:3:in `block in <top (required)>'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:432:in `instance_exec'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:432:in `eval_block'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/routing/route_set.rb:410:in `draw'
from /Users/ashleighalmeida/Rails-Blog/config/routes.rb:1:in `<top (required)>'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/file_update_checker.rb:75:in `call'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/file_update_checker.rb:75:in `execute'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/application/routes_reloader.rb:7:in `execute'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/railties-4.2.1/lib/rails/application/finisher.rb:81:in `block (2 levels) in <module:Finisher>'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:446:in `instance_exec'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:446:in `block in make_lambda'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:192:in `call'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:192:in `block in simple'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:504:in `call'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:504:in `block in call'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:504:in `each'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:504:in `call'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_prepare_callbacks'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/reloader.rb:83:in `prepare!'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/actionpack-4.2.1/lib/action_dispatch/middleware/reloader.rb:55:in `prepare!'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:153:in `serve'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:131:in `block in run'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:125:in `loop'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:125:in `run'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/spring-1.3.6/lib/spring/application/boot.rb:18:in `<top (required)>'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/ashleighalmeida/.rbenv/versions/2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
I configured it in enviornment.rb, added my alerts, what could be the problem?
There is a bug in this version of Devise with Rails. You can update to a newer version.
This should help you to solve the problem.
That's because you hadn't properly installed Devise when you generated the User model.
To resolve this problem, run this command
rails g devise:install
I'm using Delayed Job gem to dispatch emails using Amazon SES. However it runs occasionally into execution expired error. Probably some connection issues to SES. I'm wondering how can I catch this exception and re-schedule the email manually? Due to internal reasons Delayed Job is configured to single max attempt
| execution expired
/usr/local/lib/ruby/2.0.0/net/smtp.rb:540:in `initialize'
/usr/local/lib/ruby/2.0.0/net/smtp.rb:540:in `open'
/usr/local/lib/ruby/2.0.0/net/smtp.rb:540:in `tcp_socket'
/usr/local/lib/ruby/2.0.0/net/smtp.rb:550:in `block in do_start'
/usr/local/lib/ruby/2.0.0/net/smtp.rb:549:in `do_start'
/usr/local/lib/ruby/2.0.0/net/smtp.rb:519:in `start'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/mail-2.5.4/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/mail-2.5.4/lib/mail/message.rb:2129:in `do_delivery'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/mail-2.5.4/lib/mail/message.rb:232:in `block in deliver'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/actionmailer-4.0.0/lib/action_mailer/base.rb:456:in `block in deliver_mail'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `block in instrument'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `instrument'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/actionmailer-4.0.0/lib/action_mailer/base.rb:454:in `deliver_mail'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/mail-2.5.4/lib/mail/message.rb:232:in `deliver'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/performable_mailer.rb:6:in `perform'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/backend/base.rb:105:in `block in invoke_job'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:60:in `call'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:60:in `block in initialize'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:65:in `call'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:65:in `execute'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:38:in `run_callbacks'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/backend/base.rb:102:in `invoke_job'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/worker.rb:206:in `block (2 levels) in run'
/usr/local/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/worker.rb:206:in `block in run'
/usr/local/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/worker.rb:205:in `run'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/worker.rb:267:in `block in reserve_and_run_one_job'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:60:in `call'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:60:in `block in initialize'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:65:in `call'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:65:in `execute'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:38:in `run_callbacks'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/worker.rb:267:in `reserve_and_run_one_job'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/worker.rb:189:in `block in work_off'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/worker.rb:188:in `times'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/worker.rb:188:in `work_off'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/worker.rb:153:in `block (4 levels) in start'
/usr/local/lib/ruby/2.0.0/benchmark.rb:296:in `realtime'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/worker.rb:152:in `block (3 levels) in start'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:60:in `call'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:60:in `block in initialize'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:65:in `call'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:65:in `execute'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:38:in `run_callbacks'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/worker.rb:151:in `block (2 levels) in start'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/worker.rb:150:in `loop'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/worker.rb:150:in `block in start'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/plugins/clear_locks.rb:7:in `call'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/plugins/clear_locks.rb:7:in `block (2 levels) in <class:ClearLocks>'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:78:in `call'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:78:in `block (2 levels) in add'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:60:in `call'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:60:in `block in initialize'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:78:in `call'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:78:in `block in add'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:65:in `call'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:65:in `execute'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:38:in `run_callbacks'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/worker.rb:149:in `start'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/command.rb:104:in `run'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/command.rb:92:in `block in run_process'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/daemons-1.1.9/lib/daemons/application.rb:255:in `call'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/daemons-1.1.9/lib/daemons/application.rb:255:in `block in start_proc'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/daemons-1.1.9/lib/daemons/daemonize.rb:82:in `call'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/daemons-1.1.9/lib/daemons/daemonize.rb:82:in `call_as_daemon'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/daemons-1.1.9/lib/daemons/application.rb:259:in `start_proc'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/daemons-1.1.9/lib/daemons/application.rb:296:in `start'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/daemons-1.1.9/lib/daemons/application_group.rb:159:in `block (2 levels) in start_all'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/daemons-1.1.9/lib/daemons/application_group.rb:158:in `fork'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/daemons-1.1.9/lib/daemons/application_group.rb:158:in `block in start_all'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/daemons-1.1.9/lib/daemons/application_group.rb:157:in `each'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/daemons-1.1.9/lib/daemons/application_group.rb:157:in `start_all'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/daemons-1.1.9/lib/daemons/controller.rb:80:in `run'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/daemons-1.1.9/lib/daemons.rb:197:in `block in run_proc'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/daemons-1.1.9/lib/daemons/cmdline.rb:109:in `call'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/daemons-1.1.9/lib/daemons/cmdline.rb:109:in `catch_exceptions'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/daemons-1.1.9/lib/daemons.rb:196:in `run_proc'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/command.rb:90:in `run_process'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/command.rb:83:in `block in daemonize'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/command.rb:81:in `times'
/home/ubuntu/www/tf/shared/bundle/ruby/2.0.0/gems/delayed_job-4.0.0/lib/delayed/command.rb:81:in `daemonize'
/home/ubuntu/www/tf/current/bin/delayed_job:5:in `<main>'
delayed_job provides some hooks, you can use the error hook to rescheduled the task.
def error(job, exception)
# if exception is the one occurring right now for expired execution
# reschedule the job
# be careful to avoid infinite rescheduling
end