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.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With