Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby version change on heroku push

Ruby version is changed while pushing into the heroku.

       Ruby version change detected. Clearing bundler cache.
   Old: ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
   New: ruby 1.9.2p320 (2012-04-20 revision 35421) [x86_64-linux]

now heroku run 'ruby -v' returning ruby 1.9.2p320 (2012-04-20 revision 35421) [x86_64-linux].

But ruby -v still returning ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux].

Here is my rvm list

rvm list

rvm rubies

=* ruby-1.9.2-p290 [ i686 ]

# => - current
# =* - current && default
#  * - default

I don't want to change the ruby version. How it happen?. How can i solve this issue. Please help.

like image 486
Thaha kp Avatar asked Mar 25 '26 10:03

Thaha kp


2 Answers

I got the same info so I think it was change in Heroku Ruby version (mind that only patchlevel changed)

You probably can't revert this change on Heroku side, but you definately should upgrade your own Ruby version.

like image 181
Mike Szyndel Avatar answered Mar 27 '26 22:03

Mike Szyndel


Heroku has instructions about how to specify a ruby version. The document is here: https://devcenter.heroku.com/articles/ruby-versions. As @JohnBeynon said, Heroku is a PaaS so they manage many things for you including the patch version (see next paragraph). None of your RVM settings will change anything on Heroku as Heroku doesn't use RVM.

To specify the version of ruby you want, add this to your Gemfile:

ruby "1.9.2"

In your case, you can't specify the patch version so you can't fix this; however, this patch version change is a good thing. It will still be compatible, it will just have more security updates and bug fixes. You should also upgrade your local machine rather than trying to downgrade your servers. There is more on this at: https://blog.heroku.com/archives/2012/5/9/multiple_ruby_version_support_on_heroku

While you can specify the version of Ruby for you app, you can't specify a patch version, such as Ruby 1.9.2-p290. Ruby patches often include important bug and security fixes and are extremely compatible. Heroku will provide the most secure patch level of whatever minor version number you request.

like image 23
Sam Baumgarten Avatar answered Mar 27 '26 22:03

Sam Baumgarten



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!