Using the following guide
http://spontaneousderivation.com/2012/09/30/rails-3-2-on-a-shared-dreamhost-server/
I managed to get my Rails 3.2.8 application with Ruby 1.9.3 up and running on Dreamhost shared hosting using fcgi (i know it is not the best solution, but I don't want to downgrade my applications to 3.0 and I lack skill and money for a VPS ).
Following the guides on DH wiki:
http://wiki.dreamhost.com/RMagick
http://wiki.dreamhost.com/Image_Magick#Compiling_ImageMagick_on_your_DreamHost_account
I installed my own version of ImageMagic and RMagic as a local gem.
However when I try to run application with RMagic functionality I get the following error in error.log:
'Premature end of script headers: dispatch.fcgi'.
I found out it is occurring when I uncomment the following line in my uploader:
include CarrierWave::RMagick
Running dispatch.fcgi
from shell does not report any errors.
I assume that the problem might be caused by LD_LIBRARY_PATH
or other env variables (listed in DH wiki) but tried including them in my .bashrc
, .bash_profile
and dispatch.fcgi
but without effect.