image_science and deployment
Published 2007-05-31 @ 13:22
Tagged Seattle.rb, rails
We just poked around to get IS deployed on an apache/fcgi setup. Two things go wrong in the usual configuration.
- apache is running the process but HOME wasn’t set so we had to set INLINEDIR.
- INLINEDIR was initally set to
/home/limespot
but apache can’t write to that dir. - In order to fix that, we set INLINEDIR to
/home/limespot/inline
and made that dir owned byapache:apache
. - Oddly, we got another error after that, as
ld
wasn’t found. I think the error message was wrong.cc
shouldn’t be runnable ifld
isn’t runnable. We fixed that by setting up a minimal PATH.
In all, here were our conf tweaks:
DefaultInitEnv INLINEDIR /home/limespot/inline
DefaultInitEnv PATH /usr/local/bin:/usr/bin:/bin
and our shell tweaks:
% rm -rf ~limespot/.ruby_inline
% mkdir ~limespot/inline
% chown apache:apache !$
EDIT: on second thought, the INLINEDIR should go in config/environments/production.rb, probably the PATH too, but I don’t understand why that one occured yet.
ADDED 2007-08-28: INLINEDIR in production.rb is the way to go for mongrel setups.