Reputation: 3709
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.
Upvotes: 3
Views: 914
Reputation: 53158
you do not have to change the ruby version locally, ruby patchlevels should not introduce incompatibilities, you should be fine developing on older patch and deploying on newer ... that said bad things can happen as always and ruby team might be forced to introduce an incompatibility in patchlevel because of security issues.
so the best is to upgrade your local ruby version with:
rvm get stable
rvm upgrade 1.9.2
or to be more explicit:
rvm upgrade 1.9.2-p290 1.9.2-p320
Upvotes: 1
Reputation: 10592
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.
Upvotes: 3
Reputation: 2249
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.
Upvotes: 3
Reputation: 37507
Heroku will never change the major or minor version of Ruby your app is running against only the patch level.
In your Gemfile you can specify major/minor with
ruby '1.9.2'
But you cannot specify the patch level as Heroku will manage that for you. Also, when your app is on Heroku Rvm isn't used so that won't make a difference. So as Heroku change patch levels of ruby (as indicated on their changelog) you will see this type of behaviour occurring.
Upvotes: 1