简体   繁体   中英

Ruby version trouble when deploying to Heroku

I am using the following version of Ruby: ruby-1.9.3-p36. Although I get this error when I run rvm.

$ rvm list
Warning! PATH is not properly set up, '/Users/user/.rvm/gems/ruby-1.9.3-p362/bin' is not at first place,
     usually this is caused by shell initialization files - check them for 'PATH=...' entries,
     it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
     to fix temporarily in this shell session run: 'rvm use ruby-1.9.3-p362'.

rvm rubies

    ruby-1.9.3-p327 [ x86_64 ]
 =* ruby-1.9.3-p362 [ x86_64 ]
    ruby-2.0.0-rc1 [ x86_64 ]

I just deployed to Heroku and I get application error:

ruby-1.9.3-p550 is not installed.
To install do: 'rvm install ruby-1.9.3-p550'

Why is Heroku trying to use 'p550'?

Ruby has a limited set of available ruby versions and patchlevels which are listed on the support pages .

Among those are MRI ruby-1.9.3-p550 but not p362

Your first step should be to install p550 locally:

$ rvm install ruby-1.9.3-p550

You can get bundler to warn about patchlevel missmatches by adding patchlevel to your Gemfile ruby requirement.

ruby '1.9.3', :patchlevel => '550'

You can get RVM to automatically switch to the correct ruby version when you change into a project directory by adding a .ruby-version file:

$ echo ruby-1.9.3-p550 > .ruby-version 

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