0

我正在将我的 Ruby on Rails 应用程序安装到实时服务器上,但必须从版本 3 降级到 2,因为这是我的共享托管服务提供商所支持的全部。我能够毫无问题地调整我的模型、控制器和路线。我遇到的问题是视图渲染。

我按照 Rails 2 的要求完成了为每个控制器创建默认布局的过程。当我在服务器上运行应用程序时,它启动得很好,并且烟幕 index.html 是可见的,但是如果我删除它并尝试查看真正的应用程序,我得到的只是损坏的链接和无法加载的文件浏览器。

我确信这是由于降级造成的问题。关于我做错了什么的任何想法?

4

1 回答 1

3

Doing a downgrade from Rails 3 to Rails 2 seems to me like a crazy thing to do for many reasons:

1) Rails 4 is already released. You should be looking to upgrade instead of downgrading.

2) There are many hosts out there that offer amazing services and even some free. Heroku is a great place to start if you don't want to manage your own server.

3) Rails 3 was almost a complete rewrite of the way Rails worked. This includes the addition of the Assets Pipeline which is a blessing in terms of development.

With that said, if you're still looking to downgrade, I would try to revert the steps found in many Upgrading Rails 2 to Rails 3 tutorials out there.

They are a bit long and many steps required to put here but a simple google search will yield many great resources. Here's a Railscasts http://railscasts.com/episodes/226-upgrading-to-rails-3-part-2

于 2013-07-25T01:07:56.357 回答