gin*_*ime 83 bundler ruby-on-rails-3
抱歉,如果这是一个RTFM类型的问题,但我仍然是rails/ruby/bundler的新手,我有点困惑.
在我们的config/application.rb文件中有这个捆绑器段:
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
Run Code Online (Sandbox Code Playgroud)
在我们中Gemfile我们使用不同的群体,例如
group :development, :test do
gem "rspec-rails", ">= 2.7.0", :group => [:development, :test]
gem 'shoulda-matchers'
gem 'watchr'
gem 'spork', '~> 1.0rc'
gem 'spectator'
gem 'debugger'
gem 'wirble'
end
Run Code Online (Sandbox Code Playgroud)
但是当我运行RAILS_ENV=production bundle install(或bundle install --deployment)时,它仍然会从开发/测试组中安装宝石......
为什么会发生这种情况或如何使其正常工作?
Sim*_*tsa 169
看看--without选项:
bundle install --without development test
默认情况下,Bundler会安装所有宝石,您的应用程序会使用它所需的宝石.Bundler本身对Rails和当前环境一无所知.
| 归档时间: |
|
| 查看次数: |
51749 次 |
| 最近记录: |