Installing Rails on Shared Hosting
20 Aug 2005I stated in an earlier entry on installing the excellent Rublog that I may be simply delaying the inevitable move to Ruby on Rails, and I was right. The siren call of the new and shiny has won me over, and I decided to extend this site's Ruby support to include Rails. (The fact that the Typo blog engine now renders static HTML files dramatically improving performance also helped, but more on that next time.)
It is possible to install and use Rails on HostingPlex, but the performance will suffer. Rails is a large framework, and not having mod_ruby and FastCGI installed hurts performance tremendously. Until they are properly supported by HostingPlex, you should use at your own risk. But since you're reading this, I'll assume that you want to continue with installing Rails. ;)
The first step to installing Rails is to install RubyGems. Truth be known, you probably want to install gems whether you install Rails or not. Installing gems is as easy as our previous installations:
Once gems is installed, installing Rails or any other gem is the easiest thing in the world:
Be sure to answer y
when prompted by the Rails installation. While you are at it, you can also install a couple supporting libraries common to Rails apps.
By default, Rails connects to a MySQL database using a library written in Ruby. This library isn't as fast as using a compiled library. James Duncan Davidson has a great article on improving the performance or Rails apps by using the native library. To install the native library you should use these commands:
Is it me, or are these tasks getting easier?