Publify push to Heroku is rejected with invalid RUBY_VERSION

389 Views Asked by At

I'm getting the following message when I push to Heroku:

Invalid RUBY_VERSION specified: Unfortunately,-a-fatal-error-has-occurred.-Please
  -see-the-Bundler-troubleshooting-documentation-at-http://bit.ly/bundler-
  issues.-Thanks!
 !     Valid versions: ruby-2.0.0, ruby-1.9.3, ruby-1.9.2, ruby-1.8.7, 
         ruby-1.9.3-jruby-1.7.0, ruby-1.8.7-jruby-1.7.0, ruby-1.9.3-jruby-1.7.1,
         ruby-1.8.7-jruby-1.7.1, ruby-1.9.3-rbx-2.0.0dev, ruby-1.8.7-rbx-2.0.0dev
 !
 !     Heroku push rejected, failed to compile Ruby/rails app

when trying to run -> git push heroku master

ruby -v
ruby 1.9.3p385 (2013-02-06 revision 39114) [x86_64-darwin12.3.0]

in my Gemfile & Gemfile.heroku

...

source 'http://rubygems.org'
ruby '1.9.3'

Did all the [steps to troubleshoot bundler issues](https://github.com/carlhuda/bundler/blob/master/ISSUES.md] but still no luck.

1

There are 1 best solutions below

2
On BEST ANSWER

you can specify your ruby version into your gem file as

source "https://rubygems.org"
ruby "1.9.3"

and then bundle install locally and again push it.