[英]Ruby version trouble when deploying to Heroku
I am using the following version of Ruby: ruby-1.9.3-p36. 我正在使用以下版本的Ruby:ruby-1.9.3-p36。 Although I get this error when I run rvm.
虽然我在运行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: 我刚部署到Heroku并收到应用程序错误:
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'? 为什么Heroku尝试使用“ p550”?
Ruby has a limited set of available ruby versions and patchlevels which are listed on the support pages . Ruby 在支持页面上列出了一组可用的红宝石版本和补丁级别。
Among those are MRI ruby-1.9.3-p550
but not p362
其中包括MRI
ruby-1.9.3-p550
但不包括p362
Your first step should be to install p550
locally: 第一步应该是在本地安装
p550
:
$ rvm install ruby-1.9.3-p550
You can get bundler to warn about patchlevel missmatches by adding patchlevel
to your Gemfile ruby requirement. 你可以捆绑通过向警告PATCHLEVEL missmatches
patchlevel
您的Gemfile红宝石的要求。
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: 您可以通过添加
.ruby-version
文件,使RVM在切换到项目目录时自动切换到正确的ruby版本:
$ echo ruby-1.9.3-p550 > .ruby-version
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.