0

I am getting this error when pushing to my heroku staging environment.

Other related questions to this say to bundle update multi-json or to bundle update or remove Gemfile.lock and bundle install (which are all the same). None of these solutions worked for me.

my gemfile does not call multi-json I tried specifying a version of multi-json but always encountered the same problem when deploying to heroku. My dev environment works fine.

I also updated bundler to 1.3.6 and tried everything again

-----> Using Ruby version: ruby-1.9.3
-----> Installing dependencies using Bundler version 1.3.2
   Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
   fatal: Not a git repository (or any of the parent directories): .git
   fatal: Not a git repository (or any of the parent directories): .git
   fatal: Not a git repository (or any of the parent directories): .git
   Some gems seem to be missing from your vendor/cache directory.
   Could not find multi_json-1.7.2 in any of the sources
 !
 !     Failed to install gems via Bundler.
 !
 !     Heroku push rejected, failed to compile Ruby/rails app
ajbraus
  • 2,909
  • 3
  • 31
  • 45
  • I'm grabbing at straws here, but the first thing I'd try is a `heroku restart`. – Jason Swett Mar 22 '13 at 19:17
  • Another idea: it sounds like you may not have a Heroku staging server. Maybe you just have your local dev environment and then production. I'd be curious to see if you could spin up a Heroku staging server and successfully deploy there. – Jason Swett Mar 22 '13 at 19:18
  • Any chance that the source definition in your Gemfile is other than `source 'https://rubygems.org'`? – iltempo Mar 22 '13 at 19:21
  • I have a staging environment and the same error is happening in production. And the source is the same as you said source 'https://rubygems.org' – ajbraus Mar 23 '13 at 20:46

1 Answers1

2

The trick was that because vendor/cache was present, it was looking for multi_json in that folder. I just deleted it and pushed and it is working.

this question helped

What is the purpose of vendor/bundle? Heroku tells me to remove it

Community
  • 1
  • 1
ajbraus
  • 2,909
  • 3
  • 31
  • 45