![](/img/trans.png)
[英]problem deploying ruby on rails app to Heroku: ruby version issue
[英]Ruby version trouble when deploying to Heroku
我正在使用以下版本的Ruby:ruby-1.9.3-p36。 虽然我在运行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 ]
我刚部署到Heroku并收到应用程序错误:
ruby-1.9.3-p550 is not installed.
To install do: 'rvm install ruby-1.9.3-p550'
为什么Heroku尝试使用“ p550”?
Ruby 在支持页面上列出了一组可用的红宝石版本和补丁级别。
其中包括MRI ruby-1.9.3-p550
但不包括p362
第一步应该是在本地安装p550
:
$ rvm install ruby-1.9.3-p550
你可以捆绑通过向警告PATCHLEVEL missmatches patchlevel
您的Gemfile红宝石的要求。
ruby '1.9.3', :patchlevel => '550'
您可以通过添加.ruby-version
文件,使RVM在切换到项目目录时自动切换到正确的ruby版本:
$ echo ruby-1.9.3-p550 > .ruby-version
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.