我想配置捆紮機使用的guide in the bunder website不同的Rails 2.3.x版本版本的工作,這樣我就可以在其生產中使用之前測試的開發環境版本。我有以下的Gemfile:管理在開發/生產不同的軌道2.3.x版本版本的捆綁
# some common gems
group :development do
# installed on dev machine
gem "rails", "2.3.11"
#... some more dev gems
end
group :production do
gem "rails", "2.3.8", :path => 'vendor/rails'
end
當我嘗試運行DEV方式的服務器,我得到一個錯誤捆綁You cannot specify the same gem twice with different version requirements. You specified: rails (= 2.3.11) and rails (= 2.3.8) (Bundler::DslError)
。我錯過了什麼?我認爲Bundler的目標就是幫助我做到這一點。謝謝。
我很欣賞的小費,但我並不想安裝的寶石,只要運行腳本/服務器 - 寶石無論是在機器上安裝或供應商/寶石可用。當rails試圖初始化時,我得到了這個錯誤。 – sa125 2011-02-24 06:37:21
那麼你就必須需要根據您的環境有一定的寶石。如果你看的網頁,看看我的編輯答案 – corroded 2011-02-24 06:44:49
的Bundler.require(..)解決方案似乎並沒有對不同來源的寶石一樣工作我有它設置(仍然得到這個錯誤)。我看着它,它似乎(至少根據這http://bit.ly/bjdk0C)事先計劃捆紮機1.1。再次感謝! – sa125 2011-02-24 06:57:54