First Ruby on Rails Application (Mac OS X)
I've still got a Mac OS X 10.4.11 codenamed Tiger in my MacBook early 2007 despite that Leopard 10.5.3 has just recently released to the market.
A Tiger Mac OS X was pre-installed with Ruby 1.8.2. Knowing this, I immediately fired the same step-by-step tutorial as I did yesterday. However, when I tried to execute "ruby script/generate controller App", it complains that I don't have a required RubyGems to run Rails. It offers me a hint to update the gem installation. I did just so, and it complains that it can't find a rubygems-update-1.0.1. I head out to my most trusted friend on the internet, Google, and immediately directed to the HiveLogic about how to manually update the ruby installation in a Tiger machine to 1.8.6. I just tried it once, no luck, and decided to let no more time goes waste and instead, creating a new Ruby on Rails project through the NetBeans IDE.
Probably historically incorrect, but ever since NetBeans 6.1, creating a Ruby on Rails application couldn't be more simpler. Simply choose Ruby on Rails application on the New project dialog, and seconds later you had your application up and running. By default, you should see database.yml opened at your editor right away, in which you provide a database connection information to your application. In my case, it took me another several seconds to set-up MySQL databases and configured them so my newly created Ruby on Rails application could communicate with it. After all set and done, I run the project, it opened up on my Safari web-browser, up and running. Seconds flat. But still, the stench that I still had no illusion of control made me hasn't yet fully apprehended nor appreciated the nimbleness and easiness that is Ruby on Rails.
Finally, without the luxury to automate the Controllers and Views through a command line prompt as I did yesterday with my Windows version of Ruby on Rails first application, I created two additional files, app_controller.rb under the Controllers folder, and greeting.rhtml under the Views/app folder manually to obtain the same output as I did yesterday.
Next, hopefully, a further insight into this whole Ruby on Rails thing. And although it would seems rather obnoxious in my part, pardon me if I ever did just so, a blown-by-blown set up. Hm, a Video Podcast perhaps?
No comments:
Post a Comment