0

I am in the middle of putting up my Ruby on Rails app to a live server but have to downgrade from version 3 to 2 because that is all my shared hosting provider supports. I was able to adapt my models, controllers and routes without much problem. The problem I am having is with the views rendering.

I went through the process of creating a default layout for each controller as Rails 2 requires. When I run the app on the server, it starts just fine and the smokescreen index.html is visible but if I delete that and try to see the real app, all I get are broken links and files that are unable to load according to the browser.

I am sure this is an issue due to the downgrade. Any ideas on what I am doing wrong?

Pori
  • 696
  • 3
  • 7
  • 18
  • Can you manually navigate using the address bar? You'll have to regress your view code to accommodate Rails 2.x syntax. – Noz Jul 24 '13 at 22:41
  • No. All I get are broken link messages from the browser. Even if my syntax is broken, I should be getting error messages, should I not? – Pori Jul 24 '13 at 23:40
  • The syntax between Rails 3 and Rails 2 would be huge, if I recall there is no Asset Pipeline in Rails 2, so those have to go the public folder. IMO it would be best to find another hosting provider which actually supports Rails 3 – Althaf Hameez Jul 25 '13 at 00:10
  • I second Althaf's suggestion on seeking another hosting provider. Have you considered [Heroku](https://www.heroku.com/) or [BlueBox](https://bluebox.net/)? – Noz Jul 25 '13 at 16:23
  • Are you getting any exceptions in the logs of your server? – Leo Correa Jul 25 '13 at 20:28

1 Answers1

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

Leo Correa
  • 19,131
  • 2
  • 53
  • 71