gpt4 book ai didi

ruby-on-rails - 如何使用 rails 4.2.7 和 ruby​​ 2.3.3 创建 rails api 项目?

转载 作者:太空宇宙 更新时间:2023-11-03 17:44:46 24 4
gpt4 key购买 nike

我想使用 rails 4.2.7 和 ruby​​ 2.3.3 从命令行创建一个 rails api 项目。我尝试使用此命令 rails _4.2.7_ new app_name --api 但此命令需要 rails 5。

最佳答案

对于 rails 4.x,你应该使用从 1.9.3 到 2.2 的 ruby​​ 版本,如果我们使用 ruby​​ 2.3.3,那么它推荐用于 rails 5

Ruby 版本

You should use the newest version of Ruby with a new Rails application. Rails versions 3.2 to 4.2 were built to work with any version of Ruby from 1.9.3 to 2.2, allowing flexibility. However, Rails 5.0 requires Ruby 2.2.2 or newer. If you have an older application, take time to make sure it runs on the newest version of Ruby so you can upgrade to Rails 5.0.

请参阅下面的链接了解更多详情 -

http://railsapps.github.io/updating-rails.html

http://www.devalot.com/articles/2012/03/ror-compatibility

关于ruby-on-rails - 如何使用 rails 4.2.7 和 ruby​​ 2.3.3 创建 rails api 项目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42196294/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com