簡體   English   中英

Capistrano軟件包安裝嘗試在服務器上安裝開發gem

[英]Capistrano bundle install trying to install development gems on server

我有一個開發瑰寶,它試圖通過capistrano安裝在服務器上,並且由於b / c失敗,我現在指向github。

為什么無論如何仍要將此寶石安裝在我的服務器上?

Gemfile代碼段:

gem 'capistrano-local-precompile', '~> 1.0', :git => 'git@github.com:stve/capistrano-local-precompile.git', :branch => 'cap3', :group => :development, require: false

Capistrano代碼段輸出:

00:08 bundler:install
      01 ~/.rvm/bin/rvm 2.3.3 do bundle install --path /var/www/csmschedule/shared/bundle --without development test --quiet --no-cache
      01 The authenticity of host 'github.com (192.30.253.112)' can't be established.
      01
      01 RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.

您的Gemfile.lock中是否存在capistrano-local-precompileGIT部分,該鎖定文件是否已提交給您的存儲庫? 換句話說,您是否在本地運行bundle install ,提交了GemfileGemfile.lock並在運行cap deploy之前推送了這些更改?

Bundler需要了解capistrano-local-precompile gem的依賴關系才能進行版本解析。 即使您指定--without development ,它仍然需要此信息(因為開發gem的版本要求可能會影響生產版本的版本解析)。

如果您的鎖定文件不存在或已過期(即capistrano-local-precompile不在鎖定文件中),則Bundler需要從GitHub下載gem,以更新鎖定文件。

相關說明:我注意到您沒有在服務器上的bundle命令中使用--deployment 那可能不是一個好主意。 您應使用--deployment以便Bundler檢查您的Gemfile.lock是否為最新版本,如下所述:

http://bundler.io/v1.15/man/bundle-install.1.html#DEPLOYMENT-MODE

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM