2012-02-09 73 views
4

儘管Capistrano執行捆綁安裝並且標記爲--local供應商緩存中的寶石未安裝到共享捆綁包路徑中。相反,我被告知:無法從供應商緩存安裝寶石

一些寶石似乎從您的供應商/緩存目錄中缺失。

無法在任何來源

libv8-3.3.10.4肯定是位於賣主/緩存找到libv8-3.3.10.4。有誰知道爲什麼bundler不會從緩存中安裝寶石?

Capistrano執行的完整命令如下。

"cd /home/ari/apps/air/releases/20120209214139 && bundle install --gemfile /home/ari/apps/air/releases/20120209214139/Gemfile --path /home/ari/apps/air/shared/bundle --deployment --local --quiet --without development test" 
+0

我有同樣的問題。 Ran'bundle pack'然後'bundle install --deployment'在'vendor/cache'找不到它 – maletor 2012-02-11 19:00:16

+0

這看起來很像:http://groups.google.com/group/capistrano/msg/a82af2cc48784d4b。 OP宣稱已經通過安裝Rails和libv8解決了問題。不知道它是否會在你的情況下工作。 – ScottJShea 2012-02-20 10:46:26

回答

0

bundle help install

--local 
      Do not attempt to connect to rubygems.org, instead using just 
      the gems already present in Rubygems' cache or in vendor/cache. 
      Note that if a more appropriate platform-specific gem exists on 
      rubygems.org, it will not be found. 

注:libv8建立原生擴展它的首次安裝時。如果您爲一個平臺提供gem並嘗試在另一個平臺上使用它,這可能會導致問題。

服務器上的Rubygems緩存中不存在寶石,或者您的部署中的寶石不在vendor/cache中。因此,如果您在vendor/cache目錄中看到寶石,那麼它可能是捆綁商不知道在哪裏尋找您的寶石。

cd /home/ari/apps/air/releases/20120209214139 && bundle list的輸出是什麼?如果它沒有顯示在那裏,但你可以在服務器上找到它,那麼你知道打包者不知道寶石的位置。

嘗試通過登錄做gem env並通過Capistrano的比較對gem env輸出。看看GEM PATHS輸出是否有所不同。