|
Q: Why is my Ruby on Rails application with FastCGI generating "load error /etc/irbrc" errors?A: If you're hosting Ruby on Rails applications on Mac OS X 10.5 or Mac OS X 10.5 Server with FastCGI, you may encounter an error when accessing your application, accompanied by an error in the Apache error log, similar to the message in Listing 1 : Listing 1: Sample Apache error log message from FastCGI. [error] [client ::1] FastCGI: comm with server "/Library/WebServer/Documents/demoapp/dispatch.fcgi" aborted: error parsing headers: malformed header 'load error /etc/irbrc' To resolve this, first back up your current Listing 2: Replace your /etc/irbc file with these lines. require 'irb/completion' require 'irb/ext/save-history' ARGV.concat [ "--readline", "--prompt-mode", "simple" ] IRB.conf[:SAVE_HISTORY] = 100 IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history" Here is one way of doing this from within Terminal: Make a backup of % sudo mv /etc/irbrc /etc/irbc.orig Create and edit a new, empty copy of % sudo pico /etc/irbrc Copy Listing 2 and paste it into the new document, then save the file by pressing, in order, "Control-X" (Exit), "Y" (Yes), and "Return". Change the permissions of % sudo chmod a=r /etc/irbrc Finally, restart Apache % sudo apachectl graceful Internal: <rdar://problem/5517579> Document Revision History
Posted: 2007-11-28 |
|