DEPRECATION WARNING: called deprecated method `[]' of an Aws::Resources::Collection - ruby-on-rails

I recently upgraded railst from 4.2 to 5.2 and also upgraded aws-sdk and I am getting the error:
DEPRECATION WARNING: called deprecated method `[]' of an Aws::Resources::Collection
RuntimeError: unabled to index into a lazy loaded collection
with this call:
s3 = Aws::S3::Resource.new(
:access_key_id => ENV.fetch('AWS_ACCESS_KEY_ID'),
:secret_access_key => ENV.fetch('AWS_SECRET_ACCESS_KEY'),
:region => ENV.fetch('AWS_REGION')
)
bucket = s3.bucket(ENV.fetch("AWS_BUCKET"))
obj = bucket.objects[s3_key] # --> I GET THE ERROR HERE
file = Tempfile.new('file_json_file')
file.binmode
obj.read do |chunk|
file.write(chunk)
end
file.close
file.open
interpret_json_file(file)
How should I update this to make it work?
Error trace:
DEPRECATION WARNING: called deprecated method `[]' of an Aws::Resources::Collection
9:09:22 PM worker.1 | /Users/Mari/online-reporting/app/models/report_run.rb:15:in `parsed_contents_of_data_file'
9:09:22 PM worker.1 | /Users/Mari/online-reporting/app/jobs/generate_reports_job.rb:3:in `perform'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/backend/base.rb:81:in `block in invoke_job'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:61:in `block in initialize'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:66:in `execute'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:40:in `run_callbacks'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/backend/base.rb:78:in `invoke_job'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/worker.rb:230:in `block (2 levels) in run'
9:09:22 PM worker.1 | /usr/local/rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/timeout.rb:93:in `block in timeout'
9:09:22 PM worker.1 | /usr/local/rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/timeout.rb:103:in `timeout'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/worker.rb:230:in `block in run'
9:09:22 PM worker.1 | /usr/local/rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/worker.rb:229:in `run'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/worker.rb:312:in `block in reserve_and_run_one_job'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:61:in `block in initialize'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:66:in `execute'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:40:in `run_callbacks'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/worker.rb:312:in `reserve_and_run_one_job'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/worker.rb:213:in `block in work_off'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/worker.rb:212:in `times'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/worker.rb:212:in `work_off'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/worker.rb:175:in `block (4 levels) in start'
9:09:22 PM worker.1 | /usr/local/rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/benchmark.rb:308:in `realtime'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/worker.rb:174:in `block (3 levels) in start'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:61:in `block in initialize'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:66:in `execute'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:40:in `run_callbacks'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/worker.rb:173:in `block (2 levels) in start'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/worker.rb:172:in `loop'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/worker.rb:172:in `block in start'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/plugins/clear_locks.rb:7:in `block (2 levels) in <class:ClearLocks>'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:79:in `block (2 levels) in add'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:61:in `block in initialize'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:79:in `block in add'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:66:in `execute'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/lifecycle.rb:40:in `run_callbacks'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/worker.rb:171:in `start'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/delayed_job-4.1.5/lib/delayed/tasks.rb:9:in `block (2 levels) in <top (required)>'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.1/lib/rake/task.rb:271:in `block in execute'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.1/lib/rake/task.rb:271:in `each'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.1/lib/rake/task.rb:271:in `execute'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/bugsnag-6.8.0/lib/bugsnag/integrations/rake.rb:18:in `execute_with_bugsnag'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.1/lib/rake/task.rb:213:in `block in invoke_with_call_chain'
9:09:22 PM worker.1 | /usr/local/rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.1/lib/rake/task.rb:193:in `invoke_with_call_chain'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.1/lib/rake/task.rb:182:in `invoke'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.1/lib/rake/application.rb:160:in `invoke_task'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.1/lib/rake/application.rb:116:in `block (2 levels) in top_level'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.1/lib/rake/application.rb:116:in `each'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.1/lib/rake/application.rb:116:in `block in top_level'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.1/lib/rake/application.rb:125:in `run_with_threads'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.1/lib/rake/application.rb:110:in `top_level'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.1/lib/rake/application.rb:83:in `block in run'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
9:09:22 PM worker.1 | /usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.1/lib/rake/application.rb:80:in `run'
9:09:22 PM worker.1 | bin/rake:4:in `<main>'

Made the following changes and made it work:
s3 = Aws::S3::Resource.new(:access_key_id => ENV.fetch('AWS_ACCESS_KEY_ID'),
:secret_access_key => ENV.fetch('AWS_SECRET_ACCESS_KEY'),
:region => ENV.fetch('AWS_REGION'))
obj = s3.client.get_object(bucket:ENV.fetch("AWS_BUCKET"), key: s3_key.to_s)
file = Tempfile.new('report_generation_json_file')
file.binmode
file.write(obj.body.read)
file.close
file.open
interpret_json_file(file)

Related

buffering.rb:205:in `sysread_nonblock': Operation timed out (Errno::ETIMEDOUT)

When I am using this fastlane(v2.206.2) script in github actions to publish the flutter project to https://www.pgyer.com/:
- name: Deploy to TestFlight/PGY
run: |
cd ./ios
bundle exec fastlane beta
env:
FLUTTER_ROOT: ${{ secrets.FLUTTER_ROOT }}
APPLE_ID: ${{ secrets.APPLE_ID }}
GIT_URL: ${{ secrets.GIT_URL }}
PGY_USER_KEY: ${{ secrets.PGY_USER_KEY }}
PGY_API_KEY: ${{ secrets.PGY_API_KEY }}
TEAM_ID: ${{ secrets.TEAM_ID }}
ITC_TEAM_ID: ${{ secrets.ITC_TEAM_ID }}
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
FASTLANE_SESSION: ${{ secrets.FASTLANE_SESSION }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }}
MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS: ${{ secrets.DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS }}
shows error like this:
[16:01:53]: Operation timed out
+------+------------------+-------------+
| fastlane summary |
+------+------------------+-------------+
| Step | Action | Time (in s) |
+------+------------------+-------------+
| 1 | default_platform | 0 |
| 2 | xcode_select | 0 |
| 3 | is_ci | 0 |
| 4 | create_keychain | 0 |
| 5 | is_ci | 0 |
| 6 | match | 2 |
| 7 | build_app | 142 |
| 8 | gym | 102 |
| 💥 | pgyer | 1419 |
+------+------------------+-------------+
[16:01:53]: fastlane finished with errors
Looking for related GitHub issues on fastlane/fastlane...
➡️ [iTunes Transporter]: Read Timed Out - unable to upload app to TestFlight
https://github.com/fastlane/fastlane/issues/16892 [closed] 78 💬
bundler: failed to load command: fastlane (/Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/bin/fastlane)
a week ago
➡️ iTMSTransporter fails when uploading to store.
/usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/openssl/buffering.rb:205:in `sysread_nonblock': \e[31m[!] Operation timed out\e[0m (Faraday::TimeoutError)
https://github.com/fastlane/fastlane/issues/18619 [closed] 3 💬
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/openssl/buffering.rb:205:in `read_nonblock'
29 Jun 2021
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/protocol.rb:212:in `rbuf_fill'
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/protocol.rb:193:in `readuntil'
➡️ Fastlane hangs on Waiting for the build to show up in the build list when distributing to external group
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/protocol.rb:203:in `readline'
https://github.com/fastlane/fastlane/issues/15511 [closed] 20 💬
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/http/response.rb:42:in `read_status_line'
18 Jul 2020
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/http/response.rb:31:in `read_new'
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/http.rb:1557:in `block in transport_request'
and 37 more at: https://github.com/fastlane/fastlane/search?q=Operation%20timed%20out&type=Issues&utf8=✓
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/http.rb:1548:in `catch'
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/http.rb:1548:in `transport_request'
🔗 You can ⌘ + double-click on links to open them directly in your browser.
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/http.rb:1521:in `request'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-net_http-1.0.1/lib/faraday/adapter/net_http.rb:152:in `block in request_via_request_method'
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/http.rb:960:in `start'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-net_http-1.0.1/lib/faraday/adapter/net_http.rb:146:in `request_via_request_method'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-net_http-1.0.1/lib/faraday/adapter/net_http.rb:131:in `request_with_wrapped_block'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-net_http-1.0.1/lib/faraday/adapter/net_http.rb:122:in `perform_request'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-net_http-1.0.1/lib/faraday/adapter/net_http.rb:66:in `block in call'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-1.10.2/lib/faraday/adapter.rb:50:in `connection'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-net_http-1.0.1/lib/faraday/adapter/net_http.rb:64:in `call'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday_middleware-1.2.0/lib/faraday_middleware/response_middleware.rb:36:in `call'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-1.10.2/lib/faraday/request/url_encoded.rb:25:in `call'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-multipart-1.0.4/lib/faraday/multipart/middleware.rb:28:in `call'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-1.10.2/lib/faraday/rack_builder.rb:154:in `build_response'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-1.10.2/lib/faraday/connection.rb:516:in `run_request'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-1.10.2/lib/faraday/connection.rb:283:in `post'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-plugin-pgyer-0.2.3/lib/fastlane/plugin/pgyer/actions/pgyer_action.rb:106:in `run'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/runner.rb:229:in `chdir'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
from Fastfile:72:in `block (2 levels) in parsing_binding'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/lane.rb:33:in `call'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/runner.rb:45:in `chdir'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/runner.rb:45:in `execute'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/commands_generator.rb:110:in `block (2 levels) in run'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/commands_generator.rb:354:in `run'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/commands_generator.rb:43:in `start'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/bin/fastlane:23:in `<top (required)>'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/bin/fastlane:25:in `load'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/bin/fastlane:25:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/cli/exec.rb:58:in `load'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/cli/exec.rb:58:in `kernel_load'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/cli/exec.rb:23:in `run'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/cli.rb:485:in `exec'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/cli.rb:31:in `dispatch'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/cli.rb:25:in `start'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/exe/bundle:48:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/exe/bundle:36:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/bin/bundle:25:in `load'
from /usr/local/lib/ruby/gems/3.0.0/bin/bundle:25:in `<main>'
/usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/openssl/buffering.rb:205:in `sysread_nonblock': Operation timed out (Errno::ETIMEDOUT)
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/openssl/buffering.rb:205:in `read_nonblock'
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/protocol.rb:212:in `rbuf_fill'
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/protocol.rb:193:in `readuntil'
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/protocol.rb:203:in `readline'
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/http/response.rb:42:in `read_status_line'
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/http/response.rb:31:in `read_new'
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/http.rb:1557:in `block in transport_request'
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/http.rb:1548:in `catch'
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/http.rb:1548:in `transport_request'
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/http.rb:1521:in `request'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-net_http-1.0.1/lib/faraday/adapter/net_http.rb:152:in `block in request_via_request_method'
from /usr/local/Cellar/ruby#3.0/3.0.4/lib/ruby/3.0.0/net/http.rb:960:in `start'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-net_http-1.0.1/lib/faraday/adapter/net_http.rb:146:in `request_via_request_method'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-net_http-1.0.1/lib/faraday/adapter/net_http.rb:131:in `request_with_wrapped_block'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-net_http-1.0.1/lib/faraday/adapter/net_http.rb:122:in `perform_request'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-net_http-1.0.1/lib/faraday/adapter/net_http.rb:66:in `block in call'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-1.10.2/lib/faraday/adapter.rb:50:in `connection'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-net_http-1.0.1/lib/faraday/adapter/net_http.rb:64:in `call'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday_middleware-1.2.0/lib/faraday_middleware/response_middleware.rb:36:in `call'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-1.10.2/lib/faraday/request/url_encoded.rb:25:in `call'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-multipart-1.0.4/lib/faraday/multipart/middleware.rb:28:in `call'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-1.10.2/lib/faraday/rack_builder.rb:154:in `build_response'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-1.10.2/lib/faraday/connection.rb:516:in `run_request'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/faraday-1.10.2/lib/faraday/connection.rb:283:in `post'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-plugin-pgyer-0.2.3/lib/fastlane/plugin/pgyer/actions/pgyer_action.rb:106:in `run'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/runner.rb:229:in `chdir'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
from Fastfile:72:in `block (2 levels) in parsing_binding'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/lane.rb:33:in `call'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/runner.rb:45:in `chdir'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/runner.rb:45:in `execute'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/commands_generator.rb:110:in `block (2 levels) in run'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/commands_generator.rb:354:in `run'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/commands_generator.rb:43:in `start'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/gems/fastlane-2.209.1/bin/fastlane:23:in `<top (required)>'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/bin/fastlane:25:in `load'
from /Users/runner/work/cruise-open/cruise-open/ios/vendor/cache/ruby/3.0.0/bin/fastlane:25:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/cli/exec.rb:58:in `load'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/cli/exec.rb:58:in `kernel_load'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/cli/exec.rb:23:in `run'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/cli.rb:485:in `exec'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/cli.rb:31:in `dispatch'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/cli.rb:25:in `start'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/exe/bundle:48:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
from /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.3.20/exe/bundle:36:in `<top (required)>'
from /usr/local/lib/ruby/gems/3.0.0/bin/bundle:25:in `load'
from /usr/local/lib/ruby/gems/3.0.0/bin/bundle:25:in `<main>'
Error: Process completed with exit code 1.
what should I do to fixed this problem? this is the pyer fastfile config which was followed the manual from here https://github.com/shishirui/fastlane-plugin-pgyer:
gym
pgyer(
api_key: ENV['PGY_API_KEY']
)

cannot load such file -- exception_notification (LoadError)

I'm attempting to send exceptions to a slack channel. This was my set up:
Added the following to my Gemfile
gem 'exception_notification'
gem 'slack-notifier'
Created a new initializer config/initializers/errors.rb
# Works in development with or without this require
require 'exception_notification'
Rails.application.config.middleware.use(
ExceptionNotification::Rack,
:slack => {
:webhook_url => ENV["SLACK_ERROR_WEBHOOOK_URL"]
}
)
I have rebuilt my docker images and deleted the gem cache volumes.
This works properly in my development environment (errors get sent to slack), but isn't working on my production server. The only real difference that I can think of between the two is the RAILS_ENV value, at least configuration-wise. I'm fairly new to Rails however, as well as deploying to a production environment.
Immediately upon starting the app (docker-compose up) it exits with the following error:
/usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:34:in `require': cannot load such file -- exception_notification (LoadError)
app_1 | from /usr/local/bundle/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
app_1 | from /usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `block in require'
app_1 | from /usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in `load_dependency'
app_1 | from /usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `require'
app_1 | from /app/config/initializers/errors.rb:1:in `<main>'
app_1 | from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load'
app_1 | from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load'
app_1 | from /usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:319:in `block in load'
app_1 | from /usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in `load_dependency'
app_1 | from /usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:319:in `load'
app_1 | from /usr/local/bundle/gems/railties-6.0.2.1/lib/rails/engine.rb:667:in `block in load_config_initializer'
app_1 | from /usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/notifications.rb:182:in `instrument'
app_1 | from /usr/local/bundle/gems/railties-6.0.2.1/lib/rails/engine.rb:666:in `load_config_initializer'
app_1 | from /usr/local/bundle/gems/railties-6.0.2.1/lib/rails/engine.rb:624:in `block (2 levels) in <class:Engine>'
app_1 | from /usr/local/bundle/gems/railties-6.0.2.1/lib/rails/engine.rb:623:in `each'
app_1 | from /usr/local/bundle/gems/railties-6.0.2.1/lib/rails/engine.rb:623:in `block in <class:Engine>'
app_1 | from /usr/local/bundle/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in `instance_exec'
app_1 | from /usr/local/bundle/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in `run'
app_1 | from /usr/local/bundle/gems/railties-6.0.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
app_1 | from /usr/local/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
app_1 | from /usr/local/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
app_1 | from /usr/local/lib/ruby/2.6.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
app_1 | from /usr/local/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
app_1 | from /usr/local/lib/ruby/2.6.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
app_1 | from /usr/local/bundle/gems/railties-6.0.2.1/lib/rails/initializable.rb:50:in `each'
app_1 | from /usr/local/bundle/gems/railties-6.0.2.1/lib/rails/initializable.rb:50:in `tsort_each_child'
app_1 | from /usr/local/lib/ruby/2.6.0/tsort.rb:415:in `call'
app_1 | from /usr/local/lib/ruby/2.6.0/tsort.rb:415:in `each_strongly_connected_component_from'
app_1 | from /usr/local/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
app_1 | from /usr/local/lib/ruby/2.6.0/tsort.rb:347:in `each'
app_1 | from /usr/local/lib/ruby/2.6.0/tsort.rb:347:in `call'
app_1 | from /usr/local/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
app_1 | from /usr/local/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
app_1 | from /usr/local/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
app_1 | from /usr/local/bundle/gems/railties-6.0.2.1/lib/rails/initializable.rb:60:in `run_initializers'
app_1 | from /usr/local/bundle/gems/railties-6.0.2.1/lib/rails/application.rb:363:in `initialize!'
app_1 | from /app/config/environment.rb:5:in `<main>'
app_1 | from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
app_1 | from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
app_1 | from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
app_1 | from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
app_1 | from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
app_1 | from /usr/local/bundle/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
app_1 | from /usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `block in require'
app_1 | from /usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in `load_dependency'
app_1 | from /usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `require'
app_1 | from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:49:in `require_relative'
app_1 | from config.ru:3:in `block in <main>'
app_1 | from /usr/local/bundle/gems/rack-2.2.2/lib/rack/builder.rb:116:in `eval'
app_1 | from /usr/local/bundle/gems/rack-2.2.2/lib/rack/builder.rb:116:in `new_from_string'
app_1 | from /usr/local/bundle/gems/rack-2.2.2/lib/rack/builder.rb:105:in `load_file'
app_1 | from /usr/local/bundle/gems/rack-2.2.2/lib/rack/builder.rb:66:in `parse_file'
app_1 | from /usr/local/bundle/gems/rack-2.2.2/lib/rack/server.rb:349:in `build_app_and_options_from_config'
app_1 | from /usr/local/bundle/gems/rack-2.2.2/lib/rack/server.rb:249:in `app'
app_1 | from /usr/local/bundle/gems/rack-2.2.2/lib/rack/server.rb:422:in `wrapped_app'
app_1 | from /usr/local/bundle/gems/rack-2.2.2/lib/rack/server.rb:312:in `block in start'
app_1 | from /usr/local/bundle/gems/rack-2.2.2/lib/rack/server.rb:379:in `handle_profiling'
app_1 | from /usr/local/bundle/gems/rack-2.2.2/lib/rack/server.rb:311:in `start'
app_1 | from /usr/local/bundle/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:39:in `start'
app_1 | from /usr/local/bundle/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:147:in `block in perform'
app_1 | from /usr/local/bundle/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `tap'
app_1 | from /usr/local/bundle/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `perform'
app_1 | from /usr/local/bundle/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
app_1 | from /usr/local/bundle/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
app_1 | from /usr/local/bundle/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
app_1 | from /usr/local/bundle/gems/railties-6.0.2.1/lib/rails/command/base.rb:69:in `perform'
app_1 | from /usr/local/bundle/gems/railties-6.0.2.1/lib/rails/command.rb:46:in `invoke'
app_1 | from /usr/local/bundle/gems/railties-6.0.2.1/lib/rails/commands.rb:18:in `<main>'
app_1 | from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
app_1 | from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
app_1 | from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
app_1 | from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
app_1 | from /usr/local/bundle/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
app_1 | from /usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `block in require'
app_1 | from /usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in `load_dependency'
app_1 | from /usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `require'
app_1 | from bin/rails:4:in `<main>'
I've verified that the gem exception_notification is indeed installed by running docker exec -it <container-name> gem list, which includes exception_notification (4.4.3) in the output, and also running docker exec -it <container-name> gem which exception_notification which gives /usr/local/bundle/gems/exception_notification-4.4.3/lib/exception_notification.rb
Running Ruby on Rails v6.0.2 and Ruby v2.6.3
I had some similar problems when using Rails and Docker. Bootsnap cache may be stale.
Try removing the cache
rm tmp/cache/bootsnap-load-path-cache
You might also try restarting Spring
spring stop
It should restart automatically.
Try require 'exception_notification/rails'

Api key must be initialized (ArgumentError)

So, I am currently contributing to open source (React on Rails app).
I am getting the following error when I run: foreman start -f Procfile.static
The output on the terminal is:
Rajs-MacBook-Pro:Empirical-Core raj$ foreman start -f Procfile.static
17:03:40 rails.1 | started with pid 8018
17:03:40 worker.1 | started with pid 8019
17:03:40 rails-client-assets.1 | started with pid 8020
17:03:40 rails-server-assets.1 | started with pid 8021
17:03:40 redis-sidekiq.1 | started with pid 8022
17:03:40 redis-testing.1 | started with pid 8023
17:03:40 redis-caching.1 | started with pid 8024
17:03:40 redis-sidekiq.1 | 8022:C 18 Mar 17:03:40.294 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
17:03:40 redis-testing.1 | 8023:C 18 Mar 17:03:40.294 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
17:03:40 redis-caching.1 | 8024:C 18 Mar 17:03:40.293 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
17:03:40 redis-sidekiq.1 | 8022:C 18 Mar 17:03:40.298 # Redis version=4.0.8, bits=64, commit=00000000, modified=0, pid=8022, just started
17:03:40 redis-testing.1 | 8023:C 18 Mar 17:03:40.297 # Redis version=4.0.8, bits=64, commit=00000000, modified=0, pid=8023, just started
17:03:40 redis-caching.1 | 8024:C 18 Mar 17:03:40.295 # Redis version=4.0.8, bits=64, commit=00000000, modified=0, pid=8024, just started
17:03:40 redis-sidekiq.1 | 8022:C 18 Mar 17:03:40.298 # Configuration loaded
17:03:40 redis-testing.1 | 8023:C 18 Mar 17:03:40.297 # Configuration loaded
17:03:40 redis-caching.1 | 8024:C 18 Mar 17:03:40.295 # Configuration loaded
17:03:40 redis-sidekiq.1 | 8022:M 18 Mar 17:03:40.300 * Increased maximum number of open files to 10032 (it was originally set to 256).
17:03:40 redis-testing.1 | 8023:M 18 Mar 17:03:40.298 * Increased maximum number of open files to 10032 (it was originally set to 256).
17:03:40 redis-caching.1 | 8024:M 18 Mar 17:03:40.296 * Increased maximum number of open files to 10032 (it was originally set to 256).
17:03:40 redis-testing.1 | 8023:M 18 Mar 17:03:40.355 * Running mode=standalone, port=6378.
17:03:40 redis-sidekiq.1 | 8022:M 18 Mar 17:03:40.355 * Running mode=standalone, port=6379.
17:03:40 redis-testing.1 | 8023:M 18 Mar 17:03:40.355 # Server initialized
17:03:40 redis-sidekiq.1 | 8022:M 18 Mar 17:03:40.355 # Server initialized
17:03:40 redis-sidekiq.1 | 8022:M 18 Mar 17:03:40.356 * Ready to accept connections
17:03:40 redis-caching.1 | 8024:M 18 Mar 17:03:40.356 * Running mode=standalone, port=7654.
17:03:40 redis-caching.1 | 8024:M 18 Mar 17:03:40.356 # Server initialized
17:03:40 redis-caching.1 | 8024:M 18 Mar 17:03:40.356 * Ready to accept connections
17:03:40 redis-testing.1 | 8023:M 18 Mar 17:03:40.356 * Ready to accept connections
17:03:40 rails-server-assets.1 |
17:03:40 rails-server-assets.1 | > # build:dev:server /Users/raj/Desktop/Empirical-Core
17:03:40 rails-server-assets.1 | > (cd client && npm run build:dev:server --silent)
17:03:40 rails-server-assets.1 |
17:03:40 rails-client-assets.1 |
17:03:40 rails-client-assets.1 | > # build:dev:client /Users/raj/Desktop/Empirical-Core
17:03:40 rails-client-assets.1 | > (cd client && npm run build:dev:client --silent)
17:03:40 rails-client-assets.1 |
17:03:41 rails-server-assets.1 |
17:03:41 rails-server-assets.1 | Webpack is watching the files…
17:03:41 rails-server-assets.1 |
17:03:42 rails-client-assets.1 | Webpack dev build for Rails
17:03:42 rails-client-assets.1 |
17:03:42 rails-client-assets.1 | Webpack is watching the files…
17:03:42 rails-client-assets.1 |
17:03:43 rails-server-assets.1 | Hash: 4e792d6ddf1ac233e502
17:03:43 rails-server-assets.1 | Version: webpack 3.11.0
17:03:43 rails-server-assets.1 | Time: 1283ms
17:03:43 rails-server-assets.1 | Asset Size Chunks Chunk Names
17:03:43 rails-server-assets.1 | server-bundle.js 264 kB 0 [emitted] [big] main
17:03:43 rails-server-assets.1 | [89] (webpack)/buildin/global.js 509 bytes {0} [built]
17:03:43 rails-server-assets.1 | [124] multi babel-polyfill 28 bytes {0} [built]
17:03:43 rails-server-assets.1 | + 325 hidden modules
17:03:44 rails-client-assets.1 | (node:8031) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
17:03:44 rails-client-assets.1 | parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
17:03:51 worker.1 | I, [2018-03-18T17:03:51.894987 #8019] INFO -- sentry: ** [Raven] Raven 2.7.1 configured not to capture errors: DSN not set
17:03:52 worker.1 | W, [2018-03-18T17:03:52.626113 #8019] WARN -- : [SKYLIGHT] [1.5.0] Running Skylight in development mode. No data will be reported until you deploy your app.
17:03:52 worker.1 | (To disable this message for all local apps, run `skylight disable_dev_warning`.)
17:03:52 rails.1 | W, [2018-03-18T17:03:52.626636 #8018] WARN -- : [SKYLIGHT] [1.5.0] Running Skylight in development mode. No data will be reported until you deploy your app.
17:03:52 rails.1 | (To disable this message for all local apps, run `skylight disable_dev_warning`.)
17:03:53 rails.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/salesmachine-ruby-1.0.0/lib/salesmachine/api/client.rb:196:in `check_api_key!': Api key must be initialized (ArgumentError)
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/salesmachine-ruby-1.0.0/lib/salesmachine/api/client.rb:28:in `initialize'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/salesmachine-ruby-1.0.0/lib/salesmachine/api.rb:15:in `new'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/salesmachine-ruby-1.0.0/lib/salesmachine/api.rb:15:in `initialize'
17:03:53 rails.1 | from /Users/raj/Desktop/Empirical-Core/config/initializers/salesmachine.rb:5:in `new'
17:03:53 rails.1 | from /Users/raj/Desktop/Empirical-Core/config/initializers/salesmachine.rb:5:in `<top (required)>'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:268:in `load'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:268:in `block in load'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:240:in `load_dependency'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:268:in `load'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/activesupport-4.2.7.1/lib/active_support/notifications.rb:166:in `instrument'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/engine.rb:651:in `load_config_initializer'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/engine.rb:615:in `each'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `instance_exec'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `run'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
17:03:53 rails.1 | from /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
17:03:53 rails.1 | from /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
17:03:53 rails.1 | from /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
17:03:53 rails.1 | from /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
17:03:53 rails.1 | from /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/initializable.rb:44:in `each'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/initializable.rb:44:in `tsort_each_child'
17:03:53 rails.1 | from /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:415:in `call'
17:03:53 rails.1 | from /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:415:in `each_strongly_connected_component_from'
17:03:53 rails.1 | from /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
17:03:53 rails.1 | from /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each'
17:03:53 rails.1 | from /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `call'
17:03:53 rails.1 | from /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
17:03:53 rails.1 | from /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
17:03:53 rails.1 | from /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/initializable.rb:54:in `run_initializers'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/application.rb:352:in `initialize!'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/railtie.rb:194:in `public_send'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/railtie.rb:194:in `method_missing'
17:03:53 rails.1 | from /Users/raj/Desktop/Empirical-Core/config/environment.rb:5:in `<top (required)>'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/skylight-1.5.0/lib/skylight/probes.rb:81:in `require'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/skylight-1.5.0/lib/skylight/probes.rb:81:in `require'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `block in require'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:240:in `load_dependency'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `require'
17:03:53 rails.1 | from /Users/raj/Desktop/Empirical-Core/config.ru:3:in `block in <main>'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/rack-1.6.8/lib/rack/builder.rb:55:in `instance_eval'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/rack-1.6.8/lib/rack/builder.rb:55:in `initialize'
17:03:53 rails.1 | from /Users/raj/Desktop/Empirical-Core/config.ru:in `new'
17:03:53 rails.1 | from /Users/raj/Desktop/Empirical-Core/config.ru:in `<main>'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/rack-1.6.8/lib/rack/builder.rb:49:in `eval'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/rack-1.6.8/lib/rack/builder.rb:49:in `new_from_string'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/rack-1.6.8/lib/rack/builder.rb:40:in `parse_file'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/rack-1.6.8/lib/rack/server.rb:300:in `build_app_and_options_from_config'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/rack-1.6.8/lib/rack/server.rb:209:in `app'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/commands/server.rb:61:in `app'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/rack-1.6.8/lib/rack/server.rb:337:in `wrapped_app'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/commands/server.rb:139:in `log_to_stdout'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/commands/server.rb:78:in `start'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:80:in `block in server'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:75:in `server'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
17:03:53 rails.1 | from /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/commands.rb:17:in `<top (required)>'
17:03:53 rails.1 | from bin/rails:4:in `require'
17:03:53 rails.1 | from bin/rails:4:in `<main>'
17:03:53 worker.1 | Api key must be initialized
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/salesmachine-ruby-1.0.0/lib/salesmachine/api/client.rb:196:in `check_api_key!'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/salesmachine-ruby-1.0.0/lib/salesmachine/api/client.rb:28:in `initialize'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/salesmachine-ruby-1.0.0/lib/salesmachine/api.rb:15:in `new'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/salesmachine-ruby-1.0.0/lib/salesmachine/api.rb:15:in `initialize'
17:03:53 worker.1 | /Users/raj/Desktop/Empirical-Core/config/initializers/salesmachine.rb:5:in `new'
17:03:53 worker.1 | /Users/raj/Desktop/Empirical-Core/config/initializers/salesmachine.rb:5:in `<top (required)>'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:268:in `load'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:268:in `block in load'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:240:in `load_dependency'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:268:in `load'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/activesupport-4.2.7.1/lib/active_support/notifications.rb:166:in `instrument'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/engine.rb:651:in `load_config_initializer'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/engine.rb:615:in `each'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `instance_exec'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `run'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
17:03:53 worker.1 | /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
17:03:53 worker.1 | /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
17:03:53 worker.1 | /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
17:03:53 worker.1 | /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
17:03:53 worker.1 | /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/initializable.rb:44:in `each'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/initializable.rb:44:in `tsort_each_child'
17:03:53 worker.1 | /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:415:in `call'
17:03:53 worker.1 | /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:415:in `each_strongly_connected_component_from'
17:03:53 worker.1 | /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
17:03:53 worker.1 | /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each'
17:03:53 worker.1 | /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `call'
17:03:53 worker.1 | /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
17:03:53 worker.1 | /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
17:03:53 worker.1 | /Users/raj/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/initializable.rb:54:in `run_initializers'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/application.rb:352:in `initialize!'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/railtie.rb:194:in `public_send'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/railties-4.2.7.1/lib/rails/railtie.rb:194:in `method_missing'
17:03:53 worker.1 | /Users/raj/Desktop/Empirical-Core/config/environment.rb:5:in `<top (required)>'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/skylight-1.5.0/lib/skylight/probes.rb:81:in `require'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/skylight-1.5.0/lib/skylight/probes.rb:81:in `require'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `block in require'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:240:in `load_dependency'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `require'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/sidekiq-5.0.5/lib/sidekiq/cli.rb:254:in `boot_system'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/sidekiq-5.0.5/lib/sidekiq/cli.rb:54:in `run'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/gems/sidekiq-5.0.5/bin/sidekiq:12:in `<top (required)>'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/bin/sidekiq:23:in `load'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/bin/sidekiq:23:in `<main>'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/bin/ruby_executable_hooks:15:in `eval'
17:03:53 worker.1 | /Users/raj/.rvm/gems/ruby-2.3.1#quill/bin/ruby_executable_hooks:15:in `<main>'
17:03:53 rails.1 | I, [2018-03-18T17:03:51.895036 #8018] INFO -- sentry: ** [Raven] Raven 2.7.1 configured not to capture errors: DSN not set
17:03:53 rails.1 | => Booting Puma
17:03:53 rails.1 | => Rails 4.2.7.1 application starting in development on http://0.0.0.0:3000
17:03:53 rails.1 | => Run `rails server -h` for more startup options
17:03:53 rails.1 | => Ctrl-C to shutdown server
17:03:53 rails.1 | Exiting
17:03:53 worker.1 | exited with code 1
17:03:53 system | sending SIGTERM to all processes
17:03:53 rails.1 | exited with code 1
17:03:53 redis-sidekiq.1 | 8022:signal-handler (1521372833) Received SIGTERM scheduling shutdown...
17:03:53 redis-testing.1 | 8023:signal-handler (1521372833) Received SIGTERM scheduling shutdown...
17:03:53 redis-caching.1 | 8024:signal-handler (1521372833) Received SIGTERM scheduling shutdown...
17:03:53 redis-caching.1 | 8024:M 18 Mar 17:03:53.469 # User requested shutdown...
17:03:53 redis-testing.1 | 8023:M 18 Mar 17:03:53.469 # User requested shutdown...
17:03:53 redis-caching.1 | 8024:M 18 Mar 17:03:53.469 # Redis is now ready to exit, bye bye...
17:03:53 redis-testing.1 | 8023:M 18 Mar 17:03:53.469 # Redis is now ready to exit, bye bye...
17:03:53 redis-sidekiq.1 | 8022:M 18 Mar 17:03:53.489 # User requested shutdown...
17:03:53 redis-sidekiq.1 | 8022:M 18 Mar 17:03:53.489 # Redis is now ready to exit, bye bye...
17:03:53 redis-caching.1 | exited with code 0
17:03:53 redis-testing.1 | exited with code 0
17:03:53 redis-sidekiq.1 | exited with code 0
17:03:53 rails-server-assets.1 | terminated by SIGTERM
17:03:53 rails-client-assets.1 | terminated by SIGTERM
Please help!

Ruby on Rails - Foreman cannot run

I have the problem that Foreman was running correctly until a few days ago. Yesterday I made a complete upgrade of the all system, so I don't know if this caused the problem.
Anyway I cannot trace the problem back.
To solve the problem I updated all my gems, uninstalled and re-installed the myslq2 gem, but nothing has changed.
I paste the Foreman output
luca#luca-X200MA:~/cmonrails/cmonrails$ foreman start
10:46:36 web.1 | started with pid 6863
10:46:36 memcached.1 | started with pid 6864
10:46:40 web.1 | warning: parser/current is loading parser/ruby21, which recognizes
10:46:40 web.1 | warning: 2.1.7-compliant syntax, but you are running 2.1.2.
10:46:40 web.1 | warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
10:46:42 web.1 | => Booting WEBrick
10:46:42 web.1 | => Rails 4.2.3 application starting in development on http://0.0.0.0:3000
10:46:42 web.1 | => Run `rails server -h` for more startup options
10:46:42 web.1 | => Ctrl-C to shutdown server
10:46:42 web.1 | Exiting
10:46:42 web.1 | /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/connection_specification.rb:177:in `rescue in spec': Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). (Gem::LoadError)
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/connection_specification.rb:174:in `spec'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/connection_handling.rb:50:in `establish_connection'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/railtie.rb:120:in `block (2 levels) in <class:Railtie>'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:44:in `each'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/activesupport-4.2.3/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/base.rb:315:in `<module:ActiveRecord>'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/activerecord-4.2.3/lib/active_record/base.rb:26:in `<top (required)>'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/newrelic_rpm-3.14.0.305/lib/new_relic/environment_report.rb:73:in `block in <class:EnvironmentReport>'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/newrelic_rpm-3.14.0.305/lib/new_relic/environment_report.rb:99:in `call'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/newrelic_rpm-3.14.0.305/lib/new_relic/environment_report.rb:99:in `block in initialize'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/newrelic_rpm-3.14.0.305/lib/new_relic/environment_report.rb:97:in `each'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/newrelic_rpm-3.14.0.305/lib/new_relic/environment_report.rb:97:in `inject'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/newrelic_rpm-3.14.0.305/lib/new_relic/environment_report.rb:97:in `initialize'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/newrelic_rpm-3.14.0.305/lib/new_relic/agent/agent.rb:799:in `new'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/newrelic_rpm-3.14.0.305/lib/new_relic/agent/agent.rb:799:in `environment_for_connect'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/newrelic_rpm-3.14.0.305/lib/new_relic/agent/agent.rb:790:in `generate_environment_report'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/newrelic_rpm-3.14.0.305/lib/new_relic/agent/agent.rb:491:in `setup_and_start_agent'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/newrelic_rpm-3.14.0.305/lib/new_relic/agent/agent.rb:479:in `check_config_and_start_agent'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/newrelic_rpm-3.14.0.305/lib/new_relic/agent/agent.rb:547:in `start'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/newrelic_rpm-3.14.0.305/lib/new_relic/control/instance_methods.rb:112:in `start_agent'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/newrelic_rpm-3.14.0.305/lib/new_relic/control/instance_methods.rb:72:in `init_plugin'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/newrelic_rpm-3.14.0.305/lib/newrelic_rpm.rb:41:in `block in <class:Railtie>'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:30:in `instance_exec'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:30:in `run'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:55:in `block in run_initializers'
10:46:42 web.1 | from /usr/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
10:46:42 web.1 | from /usr/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
10:46:42 web.1 | from /usr/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
10:46:42 web.1 | from /usr/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
10:46:42 web.1 | from /usr/lib/ruby/2.1.0/tsort.rb:345:in `each'
10:46:42 web.1 | from /usr/lib/ruby/2.1.0/tsort.rb:345:in `call'
10:46:42 web.1 | from /usr/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
10:46:42 web.1 | from /usr/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
10:46:42 web.1 | from /usr/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/initializable.rb:54:in `run_initializers'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/application.rb:352:in `initialize!'
10:46:42 web.1 | from /home/luca/cmonrails/cmonrails/config/environment.rb:5:in `<top (required)>'
10:46:42 web.1 | from /home/luca/cmonrails/cmonrails/config.ru:3:in `require'
10:46:42 web.1 | from /home/luca/cmonrails/cmonrails/config.ru:3:in `block in <main>'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
10:46:42 web.1 | from /home/luca/cmonrails/cmonrails/config.ru:in `new'
10:46:42 web.1 | from /home/luca/cmonrails/cmonrails/config.ru:in `<main>'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/commands/server.rb:61:in `app'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/commands/server.rb:139:in `log_to_stdout'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/commands/server.rb:78:in `start'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:80:in `block in server'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:75:in `tap'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:75:in `server'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
10:46:42 web.1 | from /var/lib/gems/2.1.0/gems/railties-4.2.3/lib/rails/commands.rb:17:in `<top (required)>'
10:46:42 web.1 | from bin/rails:8:in `require'
10:46:42 web.1 | from bin/rails:8:in `<main>'
10:46:42 web.1 | exited with code 1
10:46:42 system | sending SIGTERM to all processes
10:46:42 memcached.1 | terminated by SIGTERM
I've seen this often - it seems there is an issues with the latest mysql2 gem. You should try specifying a version that previously worked. I've personally found 0.3.20 fixes the problem. So just update your Gemfile with:
gem 'mysql2', '0.3.20'
Hopefully that should fix it.
My only assumption is that there are some changes in the main mysql2 gem to support Rails 5?

Error with delayed job. Couldn't Parse YAML

I'm passing a csv file to delayed job via the following code.
csv_text = IO.read(params[:emails_import].tempfile.to_path, :encoding => 'UTF-8').gsub(" ", "")
csv_text = csv_text.gsub("\n\n", "\n")
Delayed::Job.enqueue ImportContact.new(#list.id, csv_text), :queue => "import-list-#{#list.id}"
I am receiving the following error message via foreman. Any idea what could be causing this issue? I think the error might be in the csv file, but im not sure where / what is causing the problem.
[Worker(host:ubuntu pid:22678)] Starting job worker
16:50:22 worker.1 | SQL (129.4ms) UPDATE `delayed_jobs` SET locked_at = '2013-04-16 20:50:22', locked_by = 'host:ubuntu pid:22678' WHERE (id = 121 and (locked_at is null or locked_at < '2013-04-16 16:50:22') and (run_at <= '2013-04-16 20:50:22'))
16:50:22 worker.1 | SQL (96.4ms) UPDATE `delayed_jobs` SET locked_by = null, locked_at = null WHERE (locked_by = 'host:ubuntu pid:22678')
16:50:22 worker.1 | rake aborted!
16:50:22 worker.1 | couldn't parse YAML at line 6709 column 4
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/backend/base.rb:84:in `payload_object'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/backend/base.rb:71:in `name'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/worker.rb:230:in `handle_failed_job'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/worker.rb:191:in `block in run'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:60:in `call'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:60:in `block in initialize'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:65:in `call'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:65:in `execute'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:38:in `run_callbacks'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/worker.rb:191:in `rescue in run'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/worker.rb:181:in `run'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/worker.rb:238:in `block in reserve_and_run_one_job'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:60:in `call'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:60:in `block in initialize'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:65:in `call'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:65:in `execute'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:38:in `run_callbacks'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/worker.rb:238:in `reserve_and_run_one_job'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/worker.rb:166:in `block in work_off'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/worker.rb:165:in `times'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/worker.rb:165:in `work_off'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/worker.rb:133:in `block (4 levels) in start'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/worker.rb:132:in `block (3 levels) in start'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:60:in `call'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:60:in `block in initialize'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:65:in `call'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:65:in `execute'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:38:in `run_callbacks'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/worker.rb:129:in `block (2 levels) in start'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/worker.rb:128:in `loop'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/worker.rb:128:in `block in start'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/plugins/clear_locks.rb:7:in `call'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/plugins/clear_locks.rb:7:in `block (2 levels) in <class:ClearLocks>'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:78:in `call'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:78:in `block (2 levels) in add'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:60:in `call'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:60:in `block in initialize'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:78:in `call'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:78:in `block in add'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:65:in `call'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:65:in `execute'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/lifecycle.rb:38:in `run_callbacks'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/worker.rb:127:in `start'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/gems/delayed_job-3.0.3/lib/delayed/tasks.rb:9:in `block (2 levels) in <top (required)>'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/bin/ruby_noexec_wrapper:14:in `eval'
16:50:22 worker.1 | /home/cory/.rvm/gems/ruby-1.9.2-p320#postpourri/bin/ruby_noexec_wrapper:14:in `<main>'
16:50:22 worker.1 | Tasks: TOP => jobs:work
16:50:22 worker.1 | (See full trace by running task with --trace)
16:50:22 worker.1 | exited with code 1
16:50:22 system | sending SIGTERM to all processes
SIGTERM received
I just ran this code in a brand new Rails app with Delayed::Job installed (modified from what you provided):
class List
attr_accessor :id
end
#list = List.new
#list.id = 123
class ImportContact
def initialize(list_id, csv_text)
#list_id = list_id
#csv_text = csv_text
end
def perform
puts #list_id
puts #csv_text.length
end
end
csv_text = IO.read('test_2000_import_contacts.csv', :encoding => 'UTF-8').gsub(" ", "")
csv_text = csv_text.gsub("\n\n", "\n")
Delayed::Job.enqueue ImportContact.new(#list.id, csv_text), :queue => "import-list-#{#list.id}"
When I ran bundle exec rake jobs:work, everything went through correctly, which would lead me to believe that there is a problem with the way YAML is encoding or decoding the file you are importing.
In particular, I would run
yaml = Delayed::Job.find(121).handler
File.open('job-121.yml', 'w') { |f| f.write(yaml) }
And check through the file around line 6709 column 4.
However, this might be about the time to suggest that you store your files in something like S3 and pass a URL to the ImportContact worker rather than the entire CSV text. This will alleviate the current problem you are running into and help you avoid bloating your database with huge text columns.

Resources