簡體   English   中英

Rails:運行“捆綁”命令時出錯

[英]Rails: Error running 'bundle' command

我正在運行bundle install --local並收到以下錯誤:

Your bundle is locked to rake (11.2.2), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of rake (11.2.2) has removed it. You'll need to update your bundle to a different version of rake (11.2.2) that hasn't been removed in order to install.

無法判斷需要做什么。 任何幫助將不勝感激。

嘗試運行這些命令

gem install rubygems-bundler
gem regenerate_binstubs

我在使用Jenkins時也遇到了這個問題,所以這對我有幫助:

首先通過控制台進入您的工作目錄:

cd /var/lib/jenkins/workspace/<your-job-name>

如果不確定Jenkins將項目存儲在何處,請在bash腳本中使用pwd命令。

在此目錄中,找到您的Gemfile.lock並將其刪除

rm Gemfile.lock

然后嘗試像通常從控制台那樣運行捆綁軟件

bundle install

並查看您的捆綁包正常工作。 希望它可以幫助某人解決問題。

暫無
暫無

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

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