Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku Deployment Gemfile.lock Problem

I'm pretty new to this whole deployment thing. I've deployed my app once before when I first created it, and everything seemed to work okay then. I've now made some changes to my app and I'd like to deploy them and make sure they work in a production environment. I added and committed the last of my changes and merged my changed into my master branch. Then I ran git push heroku master. I received the following error in the output:

Gemfile detected, running Bundler version 1.0.7
   Unresolved dependencies detected; Installing...
   Using --without development:test
   You have modified your Gemfile in development but did not check
   the resulting snapshot (Gemfile.lock) into version control

Okay, so I need to update my gemfile. First, I checked the contents of my .gitignore file, which are:

.bundle
db/*.sqlite3*
log/*.log
*.log
/tmp/
doc/
*.swp
*~
.project
.DS_Store
.psd

Gemfile.lock doesn't seem to be in there, but I tried the following anyway:

git add .
git commit -m "updated Gemfile.lock"

I then pushed to Heroku again and got the same error. Next, I tried:

git add Gemfile Gemfile.lock
git commit -m "updated Gemfile.lock (again)"

After pushing, I got the same result. After searching around for a while, I found this post, which prompted me to try the following:

gem update bundler
bundle update
git add Gemfile Gemfile.lock
git commit -m "updated Gemfile.lock (again (again))"

Still no luck, and I'm pretty much out of ideas at this point. I'd appreciate any suggestions.

like image 403
LandonSchropp Avatar asked Dec 16 '22 13:12

LandonSchropp


1 Answers

Well it turns out the answer was pretty simple. According to the Heroku Support Guy, you can't use if statements in your Gemfile. The offending line from my Gemfile was:

gem 'rb-fsevent', :require => true if (RUBY_PLATFORM =~ /darwin/i)
like image 102
LandonSchropp Avatar answered Jan 13 '23 17:01

LandonSchropp