私はまだ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
私たちで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
しかし、実行RAILS_ENV=production bundle install(またはbundle install --deployment)すると、開発/テストグループからgemがインストールされます...
なぜこれが発生するのですか、またはこれを適切に機能させるにはどうすればよいですか?
--withoutていますが、特にconfig/application.rb(これに正確に対処することになっている)の構成ディレクティブとこの引用を考慮すると、非常にエレガントではないようです:Rails3はbundleでサポートされています。