Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku , How to know ruby version of project?

In Heroku, I have been added as a collaborator of a project. I need to get that project in my local. And for that I need to know which Ruby version project has. Rails version of project is 3.1 I knew this via the Gemfile file.

Please suggest what should I do for that?

like image 330
Manish Shrivastava Avatar asked Mar 09 '12 10:03

Manish Shrivastava


2 Answers

For anyone looking for this, it is straightforward to get the info with

heroku run ruby -v

like image 143
chipairon Avatar answered Oct 20 '22 13:10

chipairon


You can know it by the stack use on this project.

heroku stack

If it's not Cedar stack you can have information about ruby version is used on heroku

Exemple of output

$ heroku stack                                                                                                                                                            
  aspen-mri-1.8.6
* bamboo-mri-1.9.2
  bamboo-ree-1.8.7
  cedar (beta)

The * represent the stack use on this project and the version is define.

aspen-mri-1.8.6 => MRI 1.8.6
bamboo-mri-1.9.2 => MRI 1.9.2
bamboo-ree-1.8.7 => REE 1.8.7

In case of the stack is cedar. By default the ruby version is 1.9.2 MRI. If it's change by ruby 1.9.3, It's a trick define by config. You can have information by

heroku config

You can have RUBY_VERSION => ruby-1.9.3-p0 define if the ruby 1.9.3-p0 is used.

like image 28
shingara Avatar answered Oct 20 '22 12:10

shingara