What is Toluu?
Toluu is a free service for sharing the feeds you read and discovering new ones.
Get Invite

Andre on Tech

Rails, JavaScript, Maps


Geokit 1.2: Gem + Rails plugin, Rails 2.2.2 readyDecember 21 2008

Geokit gets some love!

  • Gem released: Geokit is now separated into a Gem (geokit-gem) and a Rails plugin (geokit-rails). You can use the gem separately. The plugin requires the gem.
  • Rails 2.2.2 compatible: the plugin is all updated for Rails 2.2.2
  • Many bug fixes/updates:
    • Improved Geocoder.us support -- respects authentication, and can geocode city names or zipcodes alone
    • cross-meridian finds work correctly with bounds conditions
    • fixed a problem with columns with "distance" in their name
    • added Geonames geocoder
    • the gem and plugin are now hosted at Github. The overall site is still athttp://geokit.rubyforge.org

Geokit makes it easy to build location-based apps. It provides geocoding, location finders, and distance calculation in an easy-to-use API.

Building a simple Sinatra/DataMapper/HAML/SASS + Passenger appDecember 18 2008

Sinatra is really fun to work with. It's small and fast. It doesn't make many assumptions. If something goes wrong, it's pretty easy to go into the source and figure out what is going on.

There were a couple projects I wanted to take for a spin: Sinatra, Datamapper, HAML, and SASS. I decided to roll them all up into one proof-of-concept project. I don't go into a lot of depth on each, just enough to know that I can get it all up and running.

Also, since I'm running Passenger on some production boxes now, I wanted to deploy my Sinatra/Datamapper app through Passenger's Rack support.

How I organized my Sinatra App

Sinatra doesn't care how you organize your application. You can put everything in one file, or start to break things out into a Rails-ish directory structure. Of course, if you break things out into separate files, you'll need to require files as necessary -- Sinatra doesn't have conventions like Rails does about where to find things.

I put everything except for views in one file. So configurations, models, and actions all went in main.rb. My directory structure looks like this:

/app main.rb /views index.haml layout.haml style.sass /config deploy.rb /public Capfile Rakefile config.ru

The /app and /views directories might be overkill for a simple app like this. Coming from Rails, it was easy to lay things out like this since it's instantly recognizable to me.

My main application file

Vote for Hotspotr @ Industry StandardAugust 6 2008

vote for hotspotr

Hotspotr, my community-driven hotspot finder, is a finalist in the Industry Standard Innovation 100 Awards in the Lifestyle category. It's up against some stiff competition from well-known sites. Help us out by voting for Hotspotr!

From the Industry Standard:

We're now at the voting stage, which is also decided by the community. The more votes you get, the more likely you'll become a winner in one of the ten categories. Voting will run from now (August 4th) through October 3, 2008.

Go here to vote for Hotspotr: http://www.thestandard.com/awards/tis100/show_category/5741

Railsconf BoundMay 29 2008

Heading up this afternoon. This year looks great, lots of sessions and BOFs look interesting, and of course it's great catching up with folks from all over. I'll be at the Advanced Rails Recipes Book Signing Friday during lunch rubbing elbows with the other Recipe authors -- stop by and say hi!

Development with Rails + Passenger (AKA mod_rails) on MacMay 24 2008

Passenger, AKA mod_rails

There are a number of posts (one, two) out there on getting Phusion's Passenger up and running on OSX (Leopard). I decided to give it a go, and was pleased to discover several things:

  1. Despite reports to the contrary, Passenger installed just fine with Leopard's built-in Apache (I'm running Apache 2.2.8).
  2. Setup is very easy, as advertised.
  3. My default doc root(~/Sites) is works exactly as it did before. I do some HTML and PHP work there, so it was key that it continue to work properly.

Since the install process itself is quite easy, I wanted to offer a few tips for utilizing Passenger in a typical dev environment -- i.e., what you need after you get your first Passenger-powered Rails app up and running.

Your Brain on Passenger

As you know, script/server starts your Rails app on a specific port. If you bounce around between a number of applications at any one time, you're probably used to either starting them on different ports, or control-c'ing your current mongrel, cd'ing to another app's directory, and script/server'ing again. This familiar pattern changes when you're running passenger. All your apps are available at any one time, as long as you have your vhos