E-Scribe News : a programmer’s blog

About Me

PBX My name is Paul Bissex, and e-scribe.com is my consulting business. I build web applications using as much open source software as possible. From September to June I teach web design and other important non-photographic professional skills to photographers. In the '90s I wrote technology commentary and reviews for magazines, newspapers, and web publications, including Wired, Salon.com, FamilyPC, the late lamented Web Review, and the Chicago Tribune. Feel free to email me.

Book Project

I'm co-authoring a book, "Python Web Development with Django", with Jeff Forcier and Wesley Chun. It will be published by Prentice Hall in July 2008, but is available for pre-ordering on Amazon now.

Colophon

This site is built on a fresh trunk checkout of Django, running on Python 2.5.1, served by Apache and mod_python. The database is SQLite. The operating system is FreeBSD, on a VPS hosted at Johncompanies.com. Comment-spam protection by Akismet. Vintage topo imagery from the Maptech archive.

Pile o'Tags

Stuff I Use

Akismet, del.icio.us, Django, dpaste.com, Emacs, FreeBSD, Freenode, jQuery, LaunchBar, MacPorts, Markdown, Mercurial, OS X, Postfix, Python, SQLite, Subversion, TextMate, Trac, Ubuntu Linux, wmii

A Django site.
(Finally!)

Copyright 2008
by Paul Bissex
and E-Scribe New Media

Locomotive: Rails for OS X

This is nifty -- Locomotive, from Ryan Raaum, a complete Ruby on Rails environment in a self-contained 30MB bundle. And when I say complete, I mean complete: Locomotive contains not only Rails itself, but the Ruby interpreter, RubyGems, the LightTPD webserver with FastCGI, the SQLite database engine, bindings for MySQL and PostgreSQL (though not the server binaries, wisely), and all the other bits and pieces needed for turnkey Rails. There's also an expanded version of the package with even more goodies. If you have an existing Rails installation, Locomotive will run politely alongside it without messing anything up.

Within 60 seconds of installing, I had a dummy Rails project created and running. Within 5 minutes, proudly, I had my first error:

./script/../config/environment.rb:48:in `require': 
    No such file to load -- rubygems (LoadError)

After poking around a bit I realized this happened because I was using the default /usr/bin/ruby rather than the bundled Ruby binary. Ryan quickly confirmed this via email, and told me that the right way to work is to access the Terminal via Locomotive's "Open Terminal" command, which sets your paths appropriately.

Rails fans should be cheering Locomotive regardless of whether they actually use it. Anything that makes it easier to simply jump in and starting using a particular technology is going to help that technology spread faster. Sure, you might not want to use Locomotive for public deployment (though it would be tempting!), but it's a pleasure to use and a great way to get people hooked on Rails. It will be fun to see this develop -- perhaps in the direction of integrating with something like RADRails, though I realize the subject of IDEs in the Ruby/Rails community is a controversial one, as it is with Python.

If you're using BBEdit or TextWrangler, make sure you've got the Ruby language module.

There's not much in the way of documentation yet, but of course there's a screencast!

Saturday, October 22nd, 2005
+ +
4 comments

Comment from Dustin Ground, 14 months later

Thanks for posting the Open in Terminal hint. I just spent two hours debugging that same 'require' error.

Comment from jason, 16 months later

damn, I spent a good chunk of the evening trying to fix this.

Also, if you are using radrails with locomotive, I found this that will help you get it working smoothly with your locomotive install

http://wiki.radrails.org/wiki/RadRailsUserManual

Comment from Paul, 16 months later

It's good to hear that posts like this -- which I definitely make with searchers in mind -- occasionally reach their target. Of course, more often than not, that target is myself six or twelve months in the future!

Comment from alex, 16 months later

Ok, I must be rather stupid. I installed Locomotive and can run an application, but there is no way whatsoever to see it. When I type localhost:3000 I get an error. Apache tells me that it cannot connect to the localhost computer on that port. Of course it connects without the 3000. How do you use the LightTPD thingie?

I even configured Apache to allow cgi-bin but nothing.

Any help would be welcome.

Post a comment

Comments use Markdown syntax. Your comment will not appear until approved, which may take a few hours or more. Spammers will be torpedoed.


(Will not be shared)

(Optional)