Why I am getting Could not find multi_json-1.3.1 in any of the sources?

后端 未结 6 651
栀梦
栀梦 2021-02-08 20:43

I have a simple Rails application I want to deploy to Heroku. When I run the below command

git push heroku master

The below error message is di

6条回答
  •  我在风中等你
    2021-02-08 21:18

    I saw a series of these errors for different gems in spite of the fact I knew these gems were available (e.g. gem list -r showed them, including version; browsing rubygems.org showed the version I needed was there and hadn't been yanked etc) and I had a source set (I even set 6 different sources to be sure).

    It turned out my problem was I had git stashed before leaving a feature branch to pull the latest on develop and forgotten to pop the stash afterwards, which was a problem because I had changed my .rvmrc and not committed the change (to use a newer ruby than our production did).

    Because my .rvmrc specified a gemset for the project, stashing it meant I was suddenly bundling against a gemset that was missing a whole bunch of gems in my Gemfile.lock and for reasons I don't understand Bundler assumes if the gem is in Gemfile.lock it's already installed and it doesn't look it up remotely.

    So just in case anyone else faces this incredibly frustrating corner case I thought I'd write it up here.

提交回复
热议问题