内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用
在尝试运行时,我会得到以下错误cap production deploy
...
DEBUG [dc362284] Bundler::GemNotFound: Could not find json-1.8.1.gem for installation DEBUG [dc362284] An error occurred while installing json (1.8.1), and Bundler cannot continue. DEBUG [dc362284] Make sure that `gem install json -v '1.8.1'` succeeds before bundling.
我在当地升级了,效果很好。我运行rvm install 2.1.0
和rvm use 2.1.0
然后改变了我的.ruby-version
文件以反映Ruby的升级。
bundle install
命令在本地工作,但当我将ssh放到目标服务器并运行此命令时,会产生相同的错误。
如果我运行gem list:
... jquery-rails (3.0.4) json (1.8.1) less (2.3.2) ...
如果我尝试推荐的解决方案gem install json -v '1.8.1'
在本地和目标服务器上,我得到以下输出:
Building native extensions. This could take a while... Successfully installed json-1.8.1 Parsing documentation for json-1.8.1 Done installing documentation for json after 0 seconds 1 gem installed
为什么?