简体   繁体   English

我可以将我的应用程序降级到旧版本的Ruby和Rails吗? 怎么样?

[英]Can I downgrade my app to older versions of Ruby and Rails? How?

I just created a cool web app on my Mac using Ruby 2.2.3p173 and Rails 4.2.5. 我刚刚在Mac上使用Ruby 2.2.3p173和Rails 4.2.5创建了一个很棒的Web应用程序。

The place where I would like to host it only has up to Ruby 2.0.0 and Rails 4.2.4 installed on their shared hosting platforms. 我要托管的地方最多只能在其共享托管平台上安装Ruby 2.0.0和Rails 4.2.4。

What should I do? 我该怎么办? Can I downgrade Ruby and Rails? 我可以降级Ruby和Rails吗? If so, what is the best way to go about it? 如果是这样,最好的解决方法是什么?

Thanks 谢谢

Porting your app to an older Ruby and Rails would be a bad idea. 将您的应用程序移植到较旧的Ruby和Rails是一个坏主意。 Not only would you be exposing yourself to security holes that have been fixed in more recent releases ( Ruby 2.0 will be end of lifed on February 24, 2016 , and there have been important security patches since Rails 4.2.4 ), you would be swimming against the continuous pressure to upgrade exerted by the other gems you might want to use, documentation, etc. 您不仅会暴露于最新版本中已修复的安全漏洞( Ruby 2.0将于2016年2月24日终止生命 ,并且自Rails 4.2.4起已经发布了重要的安全补丁 ),您还将游刃有余。应对您可能要使用的其他宝石,文档等施加的持续升级压力。

There is probably nothing preventing you from installing a current version of Ruby in your own account on the hosting provider using a version manager like rbenv or rvm. 可能没有什么阻止您使用rbenv或rvm之类的版本管理器在托管提供程序上使用自己的帐户安装当前版本的Ruby的。 (I recommend rbenv.) You are also probably free to install any gems you like (probably with bundler), including current versions of Rails. (我建议使用rbenv。)您可能还可以自由安装任何您喜欢的gem(可能使用捆绑程序),包括当前版本的Rails。

If that hosting provider does prevent you from using or installing a newer Ruby or Rails, find a different hosting provider. 如果该托管服务提供商确实阻止您使用或安装较新的Ruby或Rails,请查找其他托管服务提供商。 That one will fail soon enough anyway. 无论如何,那将很快失败。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM