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!
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!
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!
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.
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!
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:
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!
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.
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:
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)