简体   繁体   中英

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?

对于任何寻找此信息的人来说,获取信息都很简单

heroku run ruby -v

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM