Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set bundler version in heroku?

Tags:

heroku

bundler

I need to specific the ruby version in my gemfile but my app in heroku is using the old bundler version 1.0.7.

If I include gem 'bundler', '1.3.2' in my gemfile it failed when I push to heroku.

Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    bundler (= 1.3.2)

  Current Bundler version:
    bundler (1.0.7)

Your version of Bundler is older than the one requested by the Gemfile.
Perhaps you need to update Bundler by running `gem install bundler`.

I also try running heroku run "gem install bundler" and it return permission error.

ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /usr/ruby1.9.2/lib/ruby/gems/1.9.1
 directory.

How can i set the Bundler version to 1.3.2 in heroku so that I can specific ruby version?

like image 269
stanicmail Avatar asked Mar 12 '13 09:03

stanicmail


People also ask

How do I change my version of bundler?

To change your bundler default version, use bundle config default <the desired version> .

How do I make bundler default?

install bundler, if you don't have specific: gem install bundler:VERSION --default.

How do I check my bundle version?

To view the APKs that Google Play generates from your app bundle: Open the App bundle explorer page (Release > App bundle explorer). On the Devices tab, select the version filter near the top right of the page. On the “Choose a version” table, select the right arrow on the version that you want to view.


1 Answers

Heroku manages bundler as part of stack. I'm guessing you are on the Bamboo stack as that uses 1.0.7 whereas Cedar is using 1.3.x version.

If you're on Bamboo then you don't have any options I'm afraid, aside from upgrading to Cedar where you will get all the latest goodness.

like image 126
John Beynon Avatar answered Oct 05 '22 12:10

John Beynon