Topic: Ruby / Plesk problems

Hi Ruby people

We have a RHEL server with Plesk 10.4

I am trying to get a ROR application to run on the server.  We have enabled CGI and FastCGI as per Plesk instructions, and added .htaccess as per Plesk instructions. ( http://kb.parallels.com/5489)

There did not seem to be any Ruby installed so i did yum install ruby, and yum install rubygems (? i think)

Now I get this error in my apache log:

[Fri Feb 24 15:06:39 2012] [warn] [client ****] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Fri Feb 24 15:06:39 2012] [error] [client ****] Premature end of script headers: dispatch.fcgi

And if I run ruby dispatch.fcgi on the command line I get this:

[root@metis public]# ruby dispatch.fcgi
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- RMagick (MissingSourceFile)
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
        from /var/www/vhosts/romanroads.co.uk/httpdocs/romanroads/vendor/plugins/simple_captcha/lib/simple_captcha_image.rb:4
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
        from /var/www/vhosts/romanroads.co.uk/httpdocs/romanroads/vendor/plugins/simple_captcha/init.rb:5:in `evaluate_init_rb'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/plugin.rb:146:in `evaluate_init_rb'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/plugin.rb:142:in `evaluate_init_rb'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/plugin.rb:48:in `load'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/plugin/loader.rb:38:in `load_plugins'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/plugin/loader.rb:37:in `each'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/plugin/loader.rb:37:in `load_plugins'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:348:in `load_plugins'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:163:in `process'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in `send'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:113:in `run'
        from ./../config/environment.rb:13

Any ideas?

I am new to Ruby, but fine with Linux, MySQL, PHP etc...

Re: Ruby / Plesk problems

Have you installed passenger? If not, you'll need to do so.

Re: Ruby / Plesk problems

Nope - new one on me - I did a quick search and tried this:


[root@metis ~]# gem install passenger
Building native extensions.  This could take a while...
ERROR:  Error installing passenger:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/fastthread-1.0.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/fastthread-1.0.7/ext/fastthread/gem_make.out

Should it install using Gem?  I tried Yum install but mod_passenger was not found.

Many thanks

Re: Ruby / Plesk problems

I am not sure if you've fixed this yet, but your issue might be solvable using the methods in this thread from stackoverflow