I was browsing a Ruby On Rails book at B&N and happened across a little note, that you could develop a Rails app entirely on a desktop machine, using a built-in Ruby web server, and deploy it with few changes to a production environment. Hot dang! That is *agile*, as the kids say these days.
I just went through this tutorial and created a working “todo list” web app on my ibook. In a very short time.
I didn’t like the idea of installing MySQL on my laptop just for this, and Rails is claimed to work just fine no matter what database you use it with, and, well, OS X Tiger comes with the SQLite db already plugged in, so I tried using SQLite instead of MySQL. It took me a little while to get to know SQLite well enough to set up a DB — a very little while.
I’m gonna have to get that darn book. Hmm… Birthday’s coming up. Might have to get meself a present.
UPDATE: The little todo program in the tutorial did indeed run just fine when I copied it up to Dreamhost to a rails environment. The only thing that took some time is moving from a sqlite db to MySQL (Dreamhost doesn’t have sqlite.) The app “just worked” in its new home. That’s pretty darn impressive.
Aren’t all web apps like that? I’ve been building php stuff on my laptop for years. I just assumed Ruby would be the same.
I don’t know. I’d never done it. I guess if you’re careful about relative URLs and all that, yeah.
How about switching databases though? :)
It seems to me that the difference with RoR is the built in server. PHP requires an apache install (easy to set up, but still a requirement), Java servlets require a container, etc.
I’ve been thinking about picking up that RoR book. For now I think I’m going to stick with the online tutorials since my playing time is limited for now (I’m hoping to get time to work out a small project using either RoR or one of the new python frameworks some time this week, but they’ll be very simple). Will be interested to hear what you think of the book.
BTW, it’s amazingly easy to install MySQL on an OS X box, although you might not even need to bother. I’m a designer and I was able to do it!
One fantastic (OS X – only) tool is “Locomotive” http://locomotive.sourceforge.net/
Locomotive is an entire Ruby on Rails development environment. Once it’s installed, you can set up a Rails app in any directory, with all the latest gems, with SQLLite, MySQL or PostGres if you have them. And Locomotive *doesn’t* get in the way of any other install of Ruby, Rails, or other components on your machine. Pretty brilliant, actually.
Sweet, I must check that out. :)