I'm currently upgrading rails from 6 to 7 and so had to upgrade my eb platform-version as well (to run ruby-3.0).

Now puma isn't able to start and always looping through:

[13033] + Gemfile in context: /var/app/current/Gemfile
[13033] ! Unable to start worker
[13033] /opt/rubies/ruby-3.0.3/lib/ruby/site_ruby/3.0.0/bundler/runtime.rb:309:in `check_for_activated_spec!'
[13033] Early termination of worker
[13035] + Gemfile in context: /var/app/current/Gemfile
[13035] ! Unable to start worker
[13035] /opt/rubies/ruby-3.0.3/lib/ruby/site_ruby/3.0.0/bundler/runtime.rb:309:in `check_for_activated_spec!'
[13035] Early termination of worker
[13037] + Gemfile in context: /var/app/current/Gemfile

When I try to start manually, it is trying to load all the gems from the development-group (which of course aren't available) BUT WHY?!

$ bundle exec puma -p 3000 -e production
Could not find byebug-11.1.3, rspec-rails-3.9.1, graphiql-rails-1.8.0, spring-2.1.1, spring-watcher-listen-2.0.1, rack-cors-1.1.1, annotate-3.2.0, letter_opener-1.8.0, rspec-core-3.9.3, rspec-expectations-3.9.4, rspec-mocks-3.9.1, rspec-support-3.9.4, sprockets-rails-3.4.2, listen-3.7.1, launchy-2.5.0, diff-lcs-1.5.0, sprockets-4.0.3, rb-fsevent-0.11.1, rb-inotify-0.10.1, addressable-2.8.0, public_suffix-4.0.6 in any of the sources
Run `bundle install` to install missing gems.

RAILS_ENV/RACK_ENV are set to production for sure...

Any ideas? :)


The environment variables (properly set via aws-eb console) aren't available in the shell-session (eb ssh). Is that normal behavior?

  • Did you ever figure this out? Currently having the same problem.
    – ev0lution
    Commented Apr 8, 2022 at 10:03
  • 1
    @ev0lution Unfortunately not. Switched to another infrastructure in the end. Luckily we're still in an early-stage atm. Would never use EB for a prod environment again. Currently running on render.com...
    – metafoo
    Commented Apr 14, 2022 at 12:51

1 Answer 1


This stems from a mismatch of the version of puma running on your eb environment and the puma version running in your application or Gemfile.

To get the puma version running on your eb environment:

eb ssh <environment>
puma -V

Make sure this version matches what you have in your Gemfile.

As far as why environment variables are not running in your shell. You will need to add an ebextension to set this up. Below is a file you can create in .ebextensions to automatically load your env variables into your shell session.

    # .ebextensions/setenvvars.config
    command: /opt/elasticbeanstalk/bin/get-config environment | jq -r 'to_entries | .[] | "export \(.key)=\"\(.value)\""' > /etc/profile.d/eb_envvars.sh
    jq: []

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .