ruby-on-railsruby-on-rails-4webrickpumarailsapps

rails ignores Gemfile


My Gemfile looks like this:

source 'https://rubygems.org'
ruby '2.2.2'
gem 'rails', '~> 4.2.1'

# a bunch of stuff that is commented out goes here

group :production do

  # Use Postgres as the database for Active Record
  gem 'pg', '~> 0.18.1'

  # An irrelevant comment
  gem 'rails_12factor', '~> 0.0.3'

  # Use Puma as the server
  gem 'puma', '~> 2.11.2'
end

When I run rails by typing rails server -e development, I see that it is running Puma, even though Puma is not specified for my development environment. If comment out the line that says gem 'puma', '~> 2.11.2', then WEBrick is used (as expected.)

Why is Puma used in the development environment, even when it is not specified as such in the gemfile?


Solution

  • Ten minutes after asking this question, I found this answer which suggested that using bundle install --without production would fix the issue, and it did. I'm going to leave this question here in case anyone else has a similar issue.