Installing Ruby on Rails on Fedora Core
Apr 08
I have an old Inspiron 2100 that I use for lightweight development. I break it out every now and then just to be truly mobile around the house. It’s running Fedora Core 4 and today I made the decision to install Ruby on Rails on it. Since this was the first time I’ve installed Rails on Linux, I set aside an hour or two just to be certain I could get it done. The entire process took about 10 minutes and I wanted to post the basics here.
The first thing I had to do was install Ruby: yum install ruby. This installs ruby and adds the command to your path. The next thing I did was install rubygems. I downloaded the file using wget http://rubyforge.org/frs/download.php/5207/rubygems-0.8.11.tgz. After the file is downloaded you can unzip it using tar zxvf rubygems-0.8.11.tgz. Now change into the newly created directory: cd rubygems-0.8.11 and run the setup file: ruby setup.rb.
After the setup file is executed you should be able to type gem and see the usage syntax. Be sure to update it just to make sure you’re running the latest version: gem update. Now you can go ahead and install rails: gem install rails –include-dependencies. This simply tails gem to install all dependencies instead of having to verify each one (ie ActiveRecord, ActionMailer, ActionWebService, etc). Once this successfully completes you’re done and ready to get rollin’ with rails.
Just to verify your installation change to a development or test directory and run rails mynewapp. Your base application structure should be complete and you can test it by changing into the directory: cd mynewapp and starting the WEBrick server: ruby script/server. You should now be able to access the base application at http://localhost:3000. I never would have thought installing Rails on Linux could be so simple.
