07.24.07

Posted in Rails at 11:14 pm by jasonb

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.

1 Comment »

  1. Lance said,

    August 19, 2007 at 6:27 pm

    It’s a feature. ;)

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

Leave a Comment

What's a blog without spam: the intense and extensive WP-Hashcash.