在我的 Rails 开发环境中 运行 时,如何防止调用我的 "production" 组?
How do I prevent my "production" group from being called when running in my Rails development enviornment?
我在 Mac OS X (El Capitan) 上使用 Rails 4.2.7。我在 Gemfile 的末尾有这个(用于我的生产环境)。我的 Gmefile 中没有其他关于 puma 的引用......
group :production do
gem 'pg'
gem 'unicorn'
gem 'puma'
end
但是当我尝试在我的开发机器(我的 Mac)上启动我的 Rails 服务器时,它正在尝试启动 Puma …
localhost:networkingproject localuser$ rails s -b 127.0.0.1
=> Booting Puma
=> Rails 4.2.7.1 application starting in development on http://127.0.0.1:3000
=> 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://127.0.0.1:3000
[93431] Use Ctrl-C to stop
localhost:networkingproject localuser$
我没有 RAILS_ENV 集。下面没有回应......
localhost:networkingproject localuser$ echo $RAILS_ENV
如何在我的开发 (Mac) 环境中不使用 Puma(正常情况下)制作 Rails 运行?
编辑: 输出以响应给定的建议……
localhost:networkingproject localuser$ rails s -b 127.0.0.1
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.
嗯,你确定你没有安装 puma gem(不是来自你的 Gemfile)?尝试
gem list
检查它并
gem uninstall puma
如果你有它并想删除它
不管怎样,通常bundle install --without production
做这个把戏
我在 Mac OS X (El Capitan) 上使用 Rails 4.2.7。我在 Gemfile 的末尾有这个(用于我的生产环境)。我的 Gmefile 中没有其他关于 puma 的引用......
group :production do
gem 'pg'
gem 'unicorn'
gem 'puma'
end
但是当我尝试在我的开发机器(我的 Mac)上启动我的 Rails 服务器时,它正在尝试启动 Puma …
localhost:networkingproject localuser$ rails s -b 127.0.0.1
=> Booting Puma
=> Rails 4.2.7.1 application starting in development on http://127.0.0.1:3000
=> 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://127.0.0.1:3000
[93431] Use Ctrl-C to stop
localhost:networkingproject localuser$
我没有 RAILS_ENV 集。下面没有回应......
localhost:networkingproject localuser$ echo $RAILS_ENV
如何在我的开发 (Mac) 环境中不使用 Puma(正常情况下)制作 Rails 运行?
编辑: 输出以响应给定的建议……
localhost:networkingproject localuser$ rails s -b 127.0.0.1
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.
嗯,你确定你没有安装 puma gem(不是来自你的 Gemfile)?尝试
gem list
检查它并
gem uninstall puma
如果你有它并想删除它
不管怎样,通常bundle install --without production
做这个把戏