I've been learning Ruby on Rails during the last 1.5 weeks. And the framework is absolutely stunning at how much functionality you can add with just a few lines of code. No, really! It's like I have read at some site - writing with Ruby on Rails is kind of using Jedi-force magic.
If you write in something like PHP, it's like.. to drink a glass of wine in your fave chair - you get up from the chair, walk the room, take a bottle of wine, pour the wine into glass, return to your chair and start enjoying the drink.
But using Ruby's secret ninja-magic all you have to do is to reach out your hand into air, make a wish and.. you already have a glass of fine wine in your hand :)
Anyway, there's a very nice tool with RAD development with Rails, which is, not surprisingly, named RadRails. And I've been fighting trying to make it work on Mac OS X. There was some problem with the paths configuration which prevented RadRails to find required command-line commands to run ruby's commands - so no project creation, code generation, WEBrick control from inside the RadRails.
I have tried solutions from RadRails web-site to set the environment paths for user processes on my computer, but with no luck. Until I have found another solution.
What you need to do is:
- open Terminal
- type cd ~ to go to your home directory
- create new directory named ".MacOSX" (mkdir .MacOSX)
- and change into the new directory cd .MacOSX
- now, create new environment.plist file with pico : pico environment.plist
- copy and paste the following code into Terminal (to insert into the newly created file)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PATH</key>
<string>/bin:/usr/local/bin:/usr/bin</string>
</dict>
</plist>
- save the file by typing Ctrl-O
- log out and log back in
You're done. Enjoy the coding :)