My website has been down for the last 2+ days. The reason: Dreamhost upgraded to Rails 2.0 without any warning. Since some of my code was not 2.0 compliant – BAM! down goes my site.
In case I can help anyone else out of a bind, or avoid this horrible fate, here are the steps I had to take to get my website back up and running with Rails 2.0:
- Add a config.actioncontroller.session entry to my environments.rb file. I added it within the Rails::Initializer block. This was in response to the following error I found in my production.log file:
A secret is required to generate an integrity hash for cookie session data. Use config.action_controller.session = { :session_key => “_myapp_session”, :secret => “some secret phrase of at least 30 characters” } in config/environment.rb
Luckily the error tells you exactly what to do
- Next, I had to fix this error:
undefined method ‘paginate’
I fixed it by installing the plugin ‘classic_pagination’. To do this you simply have to run
“script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination” from your project root.
Apparently they took out built-in pagination support from Rails 2.0. This will_paginate plugin is supposed to be better, but I didn’t care to figure out how to work it right now.
- Finally, I had to fix all of my start_form_tag entries.
There was a good demo of how to do this in the what’s new in Rails2? slideshow
have implemented AJAX style comments system. If you click on the ‘Add Comment’ button below you can see it. The difference is that now you are presented with a comments form appears within the existing page instead of a comments form being on a new page, as was the previous behavior. This is AJAX, and it is the technology that people are calling Web 2.0.
What’s the big deal you ask? By having the ability to only update parts of a web page instead of updating the whole page every time you invoke some function, it makes the browser act more like a desktop application than a web page. The end result is more robust applications served over the web. Think google maps or facebook.
As I get more comfortable with Ruby on Rails development, I have been looking to take advantage of Subversion and FastCGI – tools that are vitally important to any halfway decent rails environment. Subversion (with Capistrano) helps automate deployment, while FastCGI helps your rails web pages load quickly. At the moment, my website seems sluggish at best.
My hosting provider, Axishost , does not seem concerned about providing either of these tools to its customers. When I asked about subversion support, I got the following response:
Thanks but no thanks guys. I picked this host specifically because it advertised that it supports Ruby on Rails (and its 99.9% uptime guarantee is pretty nice). The reality seems that Axishost only partially supports Ruby on Rails. This environment is not good enough for any Rails application worth a damn.
Hi Chris, At this point there are no plans to add subversion to the servers, nor is it on schedule for the near future. If the demand increases it may become a more viable option, but at this point it is not.
Please let us know if there is anything else we can do for you!
It was the same story regarding FastCGI
FastCGI is not installed.
Get it together Axishost