Ruby on Rails Application Environment and Interactive Ruby
Apr 09
I recently posted about getting Ruby on Rails running on Fedora Core. If you’ve installed Rails before you’ve probably seen the default index page for your app. Actually, you’ve probably seen the default screen without even installing Rails. It’s just a basic index page to let you know the server is running and everything is configured correctly. If by chance you’ve clicked the link that says “About your application’s environment” you may or may not have seen some environment variables display. After my initial Linux install I was suprised to see nothing happen when I clicked the link. When viewing the server logs I saw the following error message:
127.0.0.1 – - [08/Apr/2006:14:12:42 CDT] “GET /rails/info/properties HTTP/1.1″ 200 0
- -> /rails/info/properties
[2006-04-08 14:12:43] ERROR MissingSourceFile: no such file to load — irb
It turns out that interactive Ruby is necessary to retrieve the environment information and that was the source of my problem (I didn’t have interactive Ruby installed). The irb (interactive Ruby) prompt allows you to easily run and test your scripts from the command line. Since I was missing the irb package I updated it using: yum install irb and was ready to go. I no longer received the irb error and was able to view the screen below:

If you’d like to learn more about programming Ruby check out this killer link that allows you to run Ruby commands directly from your browser. I also highly recommend the following book:

