Reputation: 5566
Recently saw this stack trace on our Heroku app on cedar
/usr/local/lib/ruby/1.9.1/uri/common.rb:156:in `split'
/usr/local/lib/ruby/1.9.1/uri/common.rb:174:in `parse'
/usr/local/lib/ruby/1.9.1/uri/common.rb:628:in `parse'
Why is it using Ruby 1.9.1?
My Gemfile is not specifying a Ruby version. Heroku's docs suggest that we should be getting the Cedar default of 1.9.2
https://devcenter.heroku.com/articles/ruby-versions
EDIT:
ruby -v appears to report the correct version
$ heroku run "ruby -v"
Running `ruby -v` attached to terminal... up, run.2594
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
Upvotes: 0
Views: 308
Reputation: 258408
It's not actually using Ruby 1.9.1 -- as this answer from Marc-André Lafortune explains, it has to do with the C interface, which hasn't changed since Ruby 1.9.1.
In Ruby 1.9.0, the C interface was changed from the Ruby 1.8 series.
Gems that compile to native code had to be recompiled.
The interface was again changed in Ruby 1.9.1 and kept the same in Ruby 1.9.2 & 3. This explains the 1.9.1 you are seeing in your path.
The idea is that you can install different versions of Ruby on your system and that gems would be shared within groups having the same C api. So Ruby 1.8.6 and 1.8.7 could share their gems, and so could Ruby 1.9.1, .2 and .3.
It's not necessarily the best idea, though. In any case, most people use rvm to access different versions of Ruby and rvm keeps gems separate for each version, irrespective of the C api version.
Upvotes: 4