Installing Rails and Mongrel on Ubuntu
So you have ruby installed and now you want to start putting together some web applications. There are several options when it comes to what web server you actually run your app on. More on that in a bit. First let’s install Rails on Ubuntu:
- gem install rails –include-dependencies
OK! you’re done…no kidding. Now verify the install with
rails -v
you should get the following as a response:
Rails 1.2.1
Now, back to what web server(s) you have the option of running your app on. In my reading about the options recently, I came across an interesting post, “Scaling Rails with Apache 2.2, mod_proxy_balancer and Mongrel” about scaling a Rails app on FreeBSD.
Since I know I’m going to be running a version of Apache I’m gonna go ahead and install Mongrel for now and worry about proxying Mongrel through Apache later. So far, this is a personal decision just based on the little bit of research I’ve done about the options and I will probably do some more due diligence by investigating the best environment for my needs when it gets closer to production time. Other options are the built-in web server (WEBrick) that comes with Rails or lighttpd which is a separate install.
The steps for installing Mongrel are almost as easy as the Rails install. Again, assuming you have Ruby (version 1.8.4 and above) and Ruby gems installed just do the following:
- sudu gem install mongrel
That’s it. You can verify the install by changing to your Rails application directory and enter the following:
mongrel_rails start -d
This should start Mongrel on port 3000.
Thanks for this short intro! One tip: I had to do a
sudo apt-get install ruby1.8-dev
or gem install mongrel would fail.
Geoff
15 Mar 07 at 6:19 pm
The steps for installing Mongrel are almost as easy as the Rails install. Again, assuming you have Ruby (version 1.8.4 and above) and Ruby gems installed just do the following:
1. sudu gem install mongrel
Mistake (sudu)= sudo
Eduard Berrio
12 Jun 08 at 12:02 pm
[...] but there’s huge evidence that Mongrel might be better than Webrick. Using the steps found here, I’ve installed Mongrel on Ubuntu by [...]
Getting Started with Ruby on Rails « OLM On Rails
17 Jul 08 at 11:32 am