Keeping Rails running at Dreamhost Part 2

Update 2/2/07: Per Thomas’ comment I’ve released the code below as the dreamhost rails plugin.
Update 1/25/07: People have reported difficulties copy and pasting the dispatch.fcgi source code from this blog post so here is a dispatch.fcgi to download. Make sure you make it executable!

My first attempt to keep my Ruby on Rails sites running at Dreamhost involved modifying dispatch.fcgi to implement the frao_handler approach as described on the wiki. This left me with a 3% 500 error rate. Ughh!
Continue reading

Posted in Linux, Ruby, Ruby on Rails, Systems Administration, Web | 10 Comments

Switching from Edge Rails to 1.2 stable with Piston

Update 1/25/07: Francois pointed out that now as of Piston 1.3.0 you can now do this all with the following command:

piston switch http://dev.rubyonrails.org/svn/rails/tags/rel_1-2-1 vendor/rails

For starters, if you’re still using svn:externals to manage your vendor/rails directory it’s time to switch to using Piston. svn:externals is so Q4!
Continue reading

Posted in Ruby, Ruby on Rails, Source Control | 1 Comment

An interview with the authors of JRuby

The Java Posse hosted a great podcast interview with the authors of JRuby: Charles Nutter and Thomas Enebo. Additionally you get to hear what Tor Norbye is up to with his work on NetBeans Ruby integration and it looks like there’s some nice code assist features in the works! Really good code assist is the thing I miss most when doing Ruby (in RadRails) as opposed to Java (in IDEA).

It’s exciting to see the convergence of my two favorite languages coming along!

Posted in Java, Ruby, Software Engineering | Leave a comment

Keeping Ruby on Rails running at Dreamhost

Update 1/12/07: This solution has reduced my 500 error rate down to less than 0.2% but it’s still not perfect. I continue to plug away at this…

Update 1/24/07: I’ve finally solved my Dreamhost 500 error problems with a different solution described in Keeping Rails running at Dreamhost part 2

This weekend I moved two of my newer Ruby on Rails based sites (http://windandtides.com and http://gearandboats.com) over to Dreamhost. You simply can’t beat their prices for hosting a small site (if you prepay for 2 years and use coupon code GABRITO to save $50 the total is $140.80) and I’ve found their customer service to be pretty responsive too.
Continue reading

Posted in Ruby, Ruby on Rails, Systems Administration, Web | 4 Comments

The Rails Way delivers the goods

I had a piece of data import code in Wind and Tides that I just knew could be cleaner and more elegant. Last week I submitted it to Jamis and Michael who write the Rails Way blog and their refactoring of it exceeded my expectations and taught me a thing or two in the process. Their blog is definitely worth a read if you’re trying to take your rails coding to the next level!

Posted in Ruby, Ruby on Rails, Software Engineering | 2 Comments

Tab completion and history with irb and script/console

One thing I love about Ruby (and really miss when working in Java) is its interactive command line interpreter irb (or script/console if you’re using Rails). I really wish irb had tab completion and saved history configured by default out of the box. The good news is it’s easy to configure by creating a $HOME/.irbrc file with the following contents:
Continue reading

Posted in Java, Ruby, Software Engineering | 3 Comments

Hello Newshutch, goodbye Bloglines

I’ve been a Bloglines user for a long time. However, after hearing about Newshutch on the Web 2.0 show podcast Episode 26 I’ve made the switch and couldn’t be happier. It sports just the right amount of Ajax, good keyboard shortcuts, and it’s built with Ruby on Rails. In short it’s by far the best web based RSS reader out there, check it out!

Posted in AJAX, Blogging, Ruby on Rails, Web | Leave a comment

Comparing Amazon EC2 with VPS and dedicated hosting

I’ve been reading all the great things about Amazon EC2 (or Elastic Compute Cloud) and lots of pricing comparisons with VPS and dedicated hosting. I finally got an EC2 account and tinkered a bit and there’s a big difference between EC2 and Virtual Private Server or Dedicated hosting that most of the preliminary write-ups I’ve seen completely overlook.
Continue reading

Posted in Database, FreeBSD, Linux, MySQL, Systems Administration | 9 Comments

Ajax enabling crusty legacy webapps with Prototype

With all of the hype around Ajax it’s easy to think you might need an MVC framework with baked in Ajax support like Rails ActionPack or JBoss Seam to make Ajax easy. However, libraries like Prototype (which is what Rails uses) make it so easy that it’s a snap to Ajax enable even the crustiest legacy web application!

Let’s take a look at what it takes to put a simple unordered list on a page with a refresh button to refresh the list without doing and page reload and then we’ll spruce it up a bit:
Continue reading

Posted in AJAX, CSS, Javascript, Software Engineering, Web | 1 Comment

Javascript debugging in Internet Explorer

It always drives me nuts when I get a Javascript error in Internet Explorer that I can’t reproduce in Firefox because I’m used to debugging Javascript in Firefox with Firebug. I finally had to buckle down and figure out how to debug Javascript in IE and fortunately the IE Blog has a nice post on how to do this. The solution I used:

1. Install the free Microsoft Script Debugger
2. In Internet Explorer:

Tools->Internet Options…->Advanced->Disable Script Debugging (Internet Explorer)
Tools->Internet Options…->Advanced->Disable Script Debugging (Other)

3. Hit a page with a Javascript error and it asks you Do you wish to Debug? and click Yes

It’ll bring up the debugger with a nice yellow line on the Javascript causing the error.

Posted in Javascript, Software Engineering, Web | 2 Comments