0

I followed every step in here: I have this in my gem file

ruby "1.9.3"

and then when I deploy heroku says:

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-1.9.3
-----> Installing dependencies using 1.5.2

Then when I do

heroku run "ruby -v"

I still get

ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]

Then I added a path:

heroku config:set PATH=bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin

Deployed again, and still same result:

I tried:

heroku config:set PATH=bin:vendor/bundle/ruby/1.9.3/bin:/usr/local/bin:/usr/bin:/bin

Still no use:

In my heroku Log I get this:

/app/vendor/bundle/ruby/1.9.1/gems/bundler-1.5.2/lib/bundler/definition.rb:390:in `validate_ruby!': Your Ruby version is 1.9.2, but your Gemfile specified 1.9.3 (Bundler::RubyVersionMismatch)

It kind of is driving me nuts, I can't get Heroku to use 1.9.3.

I looked at the following questions as well: Ruby version is not upgrading on Heroku Is it possible to run my Rails app on Heroku with Ruby 1.9.3? If so, how? How can I choose Ruby version on Heroku? Heroku cedar doesn't upgrade to ruby-1.9.3

Still can't get anywhere

Community
  • 1
  • 1
0bserver07
  • 3,390
  • 1
  • 28
  • 56
  • @Casper I might have confused you sorry, but actually I want my app to use ruby "1.9.3". So, yes I do have ruby "1.9.3" in my Gemfile, which means Heroku might pick that up. However I still tried to choose the version through those steps. – 0bserver07 Mar 26 '14 at 18:12
  • Your application may be using Ruby 1.9.3. All you know here is `heroku run "ruby -v"` doesn't use it. – Nick Veys Mar 26 '14 at 18:20
  • @NickVeys What about the error in my Heroku log :/ ? and I can't run any Heroku command it keeps saying `Ruby version is 1.9.2, but your Gemfile specified 1.9.3` – 0bserver07 Mar 26 '14 at 18:23
  • Ahh, didn't notice that. Sorry! Not sure what's going on there. Heroku support is usually pretty fast, that's probably your best route. – Nick Veys Mar 26 '14 at 18:27

1 Answers1

0

After a very painful search by removing and adding stuff from my most recent commit I realized that a file .bash_profile was added to my Rails Root app that had this in it:

export PGHOST=localhost
export PATH=/usr/local/bin:$PATH

So I just removed that, because this calls up the path to the Ruby version, the default one. I hope no one ends up making same mistake.

0bserver07
  • 3,390
  • 1
  • 28
  • 56