Natalia Natalia - 3 years ago 83
Ruby Question

How do I prevent my "production" group from being called when running in my Rails development enviornment?

Im using Rails 4.2.7 on Mac OS X (El Capitan). I have this at the end of my Gemfile (for my production environment). I have no other references to puma in my Gmefile …

group :production do
gem 'pg'
gem 'unicorn'
gem 'puma'

but when I attempt to start my Rails server on my development machine (my Mac), it is attempting to start up Puma …

localhost:networkingproject localuser$ rails s -b
=> Booting Puma
=> Rails application starting in development on
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[93431] Puma starting in cluster mode...
[93431] * Version 3.6.0 (ruby 2.3.0-p0), codename: Sleepy Sunday Serenity
[93431] * Min threads: 1, max threads: 6
[93431] * Environment: development
[93431] * Process workers: 1
[93431] * Phased restart available
[93431] * Listening on tcp://
[93431] Use Ctrl-C to stop
localhost:networkingproject localuser$

I don’t have a RAILS_ENV set. The below echoes nothing …

localhost:networkingproject localuser$ echo $RAILS_ENV

How do I make Rails run without Puma (just normally) in my development (Mac) environment?

Edit: Output in response to suggestion given …

localhost:networkingproject localuser$ rails s -b
Could not find gem 'puma' in any of the gem sources listed in your Gemfile or available on this machine.
Run `bundle install` to install missing gems.

Answer Source

Well, are you sure you don't have puma gem installed (not from your Gemfile)? Try

gem list

to check it and

gem uninstall puma

if you have it and want to remove it to be sure

Anyway, usually bundle install --without production do the trick

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download