ActiveScaffold and Mongrel death in production

Oh, I have such love for plugins that copy files around in production. I especially love it when the Rails app doesn’t have permission to write to the filesystem — why would it in production? — and Mongrel simply goes away. Running Mongrel without backgrounding it with start-stop-daemon reveals the trickery in action.

** Starting Mongrel listening at 127.0.0.1:8101
** Starting Rails with qa environment...
/usr/lib/ruby/1.8/fileutils.rb:1246:in `initialize': Permission denied -
 /srv/rails/current/config/../public/stylesheets/active_scaffold/default/stylesheet-ie.css (Errno::EACCES)

Why?

vendor/plugins/active_scaffold/init.rb
##
## Run the install script, too, just to make sure
##
#require File.dirname(__FILE__) + '/install'

Seriously, just don’t do it. At least verify the file is present before doing a blanket copy on each and every startup. Seriously.

One Comment

  1. Lance
    Posted 8/19/2007 at 6:27 pm | Permalink

    It’s a feature. ;)

    Seriously though, you can learn a lot by asking “why”:
    http://groups.google.com/group/activescaffold/browse_thread/thread/e22098d0bbe33ab0

Post a Comment

Your email is never shared. Required fields are marked *

*
*