Is there a fix for the “Could not find *gem* in any of the sources” error that doesn't involve deleting Gemfile.lock?

前端 未结 5 617
夕颜
夕颜 2021-02-05 02:39

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 f         


        
相关标签:
5条回答
  • 2021-02-05 03:19

    An old version of bundler was giving me this same issue. After a bunch of puzzling, I realized that this was the issue.

    Running gem install bundler fixed it completely.

    0 讨论(0)
  • 2021-02-05 03:23

    bundle update jquery-rails will update just the jquery-rails gem, which is likely what you're looking for. Running bundle update is the equivalent of deleting Gemfile.lock and is not recommended in most cases. See here: Heroku push rejected: can't find jquery-rails-2.0.0 in sources

    0 讨论(0)
  • 2021-02-05 03:28

    simply run

    bundle --full-index
    

    that should do the trick

    0 讨论(0)
  • 2021-02-05 03:37

    According to rubygems.org, jquery-rails 2.0.0 has been yanked. That explains the error you had with jquery-rails.

    Running $ bundle update jquery-rails will rebuild your gem snapshot. That way you don't have to delete Gemfile.lock

    0 讨论(0)
  • 2021-02-05 03:39

    I've found it safest ALWAYS to specify gem versions, and only change them when necessary. Saved me a LOT of trouble.

    0 讨论(0)
提交回复
热议问题