我有這些團體在我的Gemfile:如何使用條件中的Gemfile
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'mysql'
end
開發機沒有安裝的MySQL,這就是爲什麼我只生產組中列出的MySQL。但是,當我嘗試在開發機器上運行Rails,我得到這樣的:
$> RAILS_ENV=development ./script/rails
Could not find gem 'mysql (>= 0, runtime)' in any of the gem sources listed in your Gemfile.
很明顯,我可以通過安裝MySQL解決這個問題,但我想知道正確的解決方案,而不是安裝不需要的軟件。