是否有解决“在任何来源中都找不到 *gem*"的问题?不涉及删除 Gemfile.lock 的错误? [英] Is there a fix for the "Could not find *gem* in any of the sources" error that doesn't involve deleting Gemfile.lock?
问题描述
我正在尝试在新计算机上设置我的开发环境.
I am trying to get my development environment setup on a new computer.
git clone -o heroku git@heroku.com:theirapp.git
cd theirapp
bundle
Fetching gem metadata from https://rubygems.org/......
Fetching gem metadata from https://rubygems.org/..
Could not find jquery-rails-2.0.0 in any of the sources
谷歌搜索这个错误后,响应似乎是删除Gemfile.lock
,然后再次运行bundle
.这有效,但是我有不同版本的 gems,我没有在 Gemfile
中指定一个版本.有没有办法在不删除 Gemfile.lock
的情况下修复这个错误?我使用的是 Rails 3.2 和 Ruby 1.9.3.
After googling this error, the response seems to be to delete Gemfile.lock
, then running bundle
again. This works, but then I have different versions of gems where I haven't specified a version in Gemfile
. Is there a way to fix this error without deleting Gemfile.lock
? I'm using Rails 3.2 and Ruby 1.9.3.
推荐答案
据 rubygems.org 称,jquery-rails 2.0.0 已经猛拉.这解释了您在使用 jquery-rails 时遇到的错误.
According to rubygems.org, jquery-rails 2.0.0 has been yanked. That explains the error you had with jquery-rails.
运行 $ bundle update jquery-rails
将重建您的 gem 快照.这样你就不必删除 Gemfile.lock
Running $ bundle update jquery-rails
will rebuild your gem snapshot. That way you don't have to delete Gemfile.lock
这篇关于是否有解决“在任何来源中都找不到 *gem*"的问题?不涉及删除 Gemfile.lock 的错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!