0
我們使用capistrano進行導軌部署。在生產服務器上運行bundle install
時,這是一個奇怪的錯誤。捆綁軟件安裝無法執行,導致導軌生產服務器出錯
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
If this is a development machine, remove the Gemfile freeze
by running `bundle install --no-deployment`.
You have added to the Gemfile:
* rails (= 3.1.3)
* mysql2 (>= 0.2.6)
You have deleted from the Gemfile:
* rails (~> 3.1.3)
生產服務器上的Gemfile被手動更改,然後出現此錯誤。這是一個新的生產服務器,我們計劃運行rails 3.1.3。我們重新啓動了Linux服務器,並沒有幫助。有沒有辦法解決這個問題?非常感謝。
將再試一次。重新提交併重新部署。但問題沒有解決。我們不在開發中使用mysql,這是gemfile唯一的區別。 – user938363 2012-03-01 21:52:13
@ user938363:使用捆綁器組。查看更新的答案。 – 2012-03-01 21:55:11
看起來不錯,並會嘗試。正在改變database.yml文件好嗎?我們的帽子將複製寶石文件和database.yml。有了這個組,就不需要複製gemfile。謝謝。 – user938363 2012-03-01 22:01:55