Manish Shrivastava
Manish Shrivastava

Reputation: 32040

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?

Upvotes: 9

Views: 3583

Answers (2)

chipairon
chipairon

Reputation: 2061

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

heroku run ruby -v

Upvotes: 32

shingara
shingara

Reputation: 46914

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.

Upvotes: 13

Related Questions