如何配置一组gem,使其不会在生产环境中下载?
所以如果我有这个Gemfile:
source 'http://rubygems.org'
gem 'rails'
gem 'facebook_oauth'
gem 'koala', '>=1.0.0.rc'
gem "jquery-rails"
gem 'faraday', '0.5.7'
group :development, :test do
gem "rspec-rails", ">= 2.0.0"
gem "steak"
gem 'launchy'
gem "capybara"
gem 'akephalos', :git => 'git://github.com/Nerian/akephalos.git'
end标有:development和:test的gem不应该在生产环境中下载。
发布于 2011-04-28 23:13:23
您希望使用选项--without运行bundler install
bundler install --without development test关于Heroku的更新:
heroku config:add BUNDLE_WITHOUT="development:test"你可以找到更多的Heroku + Bundler信息here
发布于 2014-11-20 03:13:42
通过Capistrano部署:
# config/deploy.rb
set :bundle_without, [:development, :test, :your_custom_group]https://stackoverflow.com/questions/5820776
复制相似问题