我如何选择Heroku上的Ruby版本?

编程入门 行业动态 更新时间:2024-10-28 02:35:07
本文介绍了我如何选择Heroku上的Ruby版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在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版本?

本文发布于:2023-10-13 09:29:50,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何选择   版本   Heroku   Ruby

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!