我在Rails 3应用程序中使用了Ruby 1.9.x语法,但在推向Heroku后,由于旧版本的Ruby版本(1.8)而崩溃。如何控制它?
I use Ruby 1.9.x syntax in my Rails 3 app, but after pushing it to Heroku it crashes due to older Ruby version (1.8). How can I control it?
推荐答案Heroku目前的堆栈Cedar默认使用1.9.2。 Cedar还支持在您的Gemfile中指定Ruby版本。目前, 1.9.2和1.9.3是有效的选项。 p>
Heroku's current stack, Cedar, uses 1.9.2 by default. Cedar also supports specifying the Ruby version in your Gemfile. Currently, 1.9.2 and 1.9.3 are valid options.
# Gemfile source "rubygems" ruby "1.9.3" ...Ruby支持文章中提供了更多详细信息: devcenter.heroku/articles/ruby-support
More details are available in the Ruby support article: devcenter.heroku/articles/ruby-support
如果您正在使用Aspen或Bamboo,则可以使用堆栈切换到1.9.2:migrate 命令:
If you are currently using Aspen or Bamboo, you can switch to 1.9.2 by using the stack:migrate command:
$ heroku stack:migrate bamboo-mri-1.9.2您目前无法自动迁移到Cedar堆栈,但有如何操作的指导: devcenter.heroku/articles/cedar-migration
You cannot automatically migrate to the Cedar stack at this time, but there is a guide on how to do so: devcenter.heroku/articles/cedar-migration
更多推荐
我如何选择Heroku上的Ruby版本?
发布评论