1

So I'm trying to deploy my first app, and have run in to some trouble, looks like I keep getting the warning below about "running version of Bundler is older than the version that created the lockfile." Any ideas on how to replace updated Gemfile.lock to version control. below is the full error:

kparekh01:~/workspace/hello_app (master) $ git push heroku master
Counting objects: 68, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (57/57), done.
Writing objects: 100% (68/68), 17.20 KiB | 0 bytes/s, done.
Total 68 (delta 3), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.4
remote: -----> Installing dependencies using bundler 1.11.2
remote:        Running: bundle install --without development:test --path       vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote:        You are trying to install in deployment mode after changing
remote:        your Gemfile. Run `bundle install` elsewhere and add the
remote:        updated Gemfile.lock to version control.
remote:        You have added to the Gemfile:  
remote:        * sass-rails (= 5.0.2)
remote:        * uglifier (= 2.5.3)
remote:        * coffee-rails (= 4.1.0)
remote:        * jquery-rails (= 4.0.3)
remote:        * turbolinks (= 2.3.0)
remote:        * jbuilder (= 2.2.3)
remote:        * sdoc (= 0.4.0)
remote:        * sqlite3 (= 1.3.9)
remote:        * byebug (= 3.4.0)
remote:        * web-console (= 2.0.0.beta3)
remote:        * spring (= 1.1.3)
remote:        * pg (= 0.17.1)
remote:        * rails_12factor (= 0.0.2)
remote:        You have deleted from the Gemfile:
remote:        * byebug
remote:        * coffee-rails (~> 4.1.0)
remote:        * jbuilder (~> 2.0)
remote:        * jquery-rails
remote:        * sass-rails (~> 5.0)
remote:        * sdoc (~> 0.4.0)
remote:        * spring
remote:        * sqlite3
remote:        * turbolinks
remote:        * uglifier (>= 1.3.0)
remote:        * web-console (~> 2.0)
remote:        Bundler Output: Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote:        You are trying to install in deployment mode after changing
remote:        your Gemfile. Run `bundle install` elsewhere and add the
remote:        updated Gemfile.lock to version control.
remote:        
remote:        You have added to the Gemfile:
remote:        * sass-rails (= 5.0.2)
remote:        * uglifier (= 2.5.3)
remote:        * coffee-rails (= 4.1.0)
remote:        * jquery-rails (= 4.0.3)
remote:        * turbolinks (= 2.3.0)
remote:        * jbuilder (= 2.2.3)
remote:        * sdoc (= 0.4.0)
remote:        * sqlite3 (= 1.3.9)
remote:        * byebug (= 3.4.0)
remote:        * web-console (= 2.0.0.beta3)
remote:        * spring (= 1.1.3)
remote:        * pg (= 0.17.1)
remote:        * rails_12factor (= 0.0.2)
remote:        
remote:        You have deleted from the Gemfile:
remote:        * byebug
remote:        * coffee-rails (~> 4.1.0)
remote:        * jbuilder (~> 2.0)
remote:        * jquery-rails
remote:        * sass-rails (~> 5.0)
remote:        * sdoc (~> 0.4.0)
remote:        * spring
remote:        * sqlite3
remote:        * turbolinks
remote:        * uglifier (>= 1.3.0)
remote:        * web-console (~> 2.0)
remote:  !
remote:  !     Failed to install gems via Bundler.
remote:  !
remote: 
remote:  !     Push rejected, failed to compile Ruby app
remote: 
remote: Verifying deploy....
remote: 
remote: !       Push rejected to murmuring-forest-66232.
remote: 
To https://git.heroku.com/murmuring-forest-66232.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/murmuring-forest-   66232.git'
kparekh01
  • 221
  • 1
  • 7
  • It looks like you made some changes to your Gemfile but did not ran `bundle install` afterwards which updates Gemfile.lock. Doing `bundle install` can fix your problem – Vbp Jun 03 '16 at 04:21
  • Thanks for the answer, but did exactly as advised, but still get the same exact error message. Anything else ? – kparekh01 Jun 03 '16 at 18:30
  • did you also update your bundler by `gem install bundler` ? You can also delete your gemfile.lock and run bundle install which will recreate the gemfile.lock – Vbp Jun 03 '16 at 19:05

4 Answers4

0

First make sure your bundler is up to date by using

`gem install bundler'

Next run your bundle installation again and ensure it completes. The main cause for this issue is the gem file and lock file not matching. The bundler is what updates the lock file.

0

Warning message is saying you need to run gem install bundler to get the latest version of bundler. Once you do that do bundle install this will update your Gemfile.lock which should be pushed to your repository. I will recommend reading this SO post for understanding more about Gemfile and Gemfile.lock

Community
  • 1
  • 1
Vbp
  • 1,912
  • 1
  • 22
  • 30
0

You can solve your error and will be able to upload your application to heroku after updating your bundle. To install and update bundle use below commands.

$ bundle install 

$ bundle update

This is usual process which you have to follow every time you make any changes to your gem file in order to make your application aware with new editing you make in your gem file.

Shyam Bhimani
  • 1,310
  • 1
  • 22
  • 37
  • So I tried various versions of the advice on the board, and nothing has worked. the following is causing the main error: remote: -----> Using Ruby version: ruby-2.2.4 remote: -----> Installing dependencies using bundler 1.11.2. --> when in reality my gem lock file is BUNDLED WITH 1.12.5. How do I change the version of the bundler to 1.11.2, which should stop giving this error? Any ideas, thanks in advance. – kparekh01 Jun 06 '16 at 17:55
0

Never mind, finally figured out my blunder, it was rather simple. I installed and updated everything properly, but since I was doing this on cloud 9 ide, I had to git add, git commit, and git push my changes, I will never be forgetting that ever again for as long as I live. Thanks for all your help guys.

kparekh01
  • 221
  • 1
  • 7
  • Yeah you have to use `git add .` `git commit -am "some comment" ` and `git push heroku master ` command to be able to see changes on heroku. – Shyam Bhimani Jun 06 '16 at 23:59