Ruby on Rails w/ RubyGems

I am unable to install Ruby on Rails for a site using the install script. It fails with RubyGems:

Now installing Ruby on Rails version 2.2.2 ..

Mongrel server did not start :

** Ruby version is not up-to-date; loading cgi_multipart_eof_fix
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with production environment...
** Mounting Rails at /rails...
Rails requires RubyGems >= 1.3.1 (you have 1.3.0). Please `gem update --system` and try again.

.. failed! See the error message above for the reason why.

We had updated RubyGems manually before from .90 but I was wondering if we'll have to manually update the gems when ever it is updated or if our VM server should know when there is a newer version and prompt to update gems from within VM?

Status: 
Active

Comments

I have trouble getting rails working. I am running VirtualMin 3.74. Its hanging on trying to install fcgi.

Help,, Rails was working just fine as a install script before I upgrade to 3.74.

JT

JT - what is the error message you are getting in Virtualmin, or output at the point where it hangs?

Here is the output:

Installing Ruby Gem test-spec .. .. done

Installing Ruby Gem camping .. .. done

Installing Ruby Gem fcgi .. .. Gem install failed : INFO: gem install -y is now default and will be removed INFO: use --ignore-dependencies to install only the gems you list Building native extensions. This could take a while... ERROR: Error installing fcgi: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb --with-mysql-include=/usr/include/mysql --with-mysql-lib=/usr/lib/mysql checking for fcgiapp.h... no checking for fastcgi/fcgiapp.h... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/bin/ruby --with-fcgi-dir --without-fcgi-dir --with-fcgi-include --without-fcgi-include=${fcgi-dir}/include --with-fcgi-lib --without-fcgi-lib=${fcgi-dir}/lib Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/fcgi-0.8.8 for inspection. Results logged to /usr/lib64/ruby/gems/1.8/gems/fcgi-0.8.8/ext/fcgi/gem_make.out

<- Return to list of scripts

Here is the output:

Installing Ruby Gem test-spec .. .. done

Installing Ruby Gem camping .. .. done

Installing Ruby Gem fcgi .. .. Gem install failed : INFO: gem install -y is now default and will be removed INFO: use --ignore-dependencies to install only the gems you list Building native extensions. This could take a while... ERROR: Error installing fcgi: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb --with-mysql-include=/usr/include/mysql --with-mysql-lib=/usr/lib/mysql checking for fcgiapp.h... no checking for fastcgi/fcgiapp.h... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/bin/ruby --with-fcgi-dir --without-fcgi-dir --with-fcgi-include --without-fcgi-include=${fcgi-dir}/include --with-fcgi-lib --without-fcgi-lib=${fcgi-dir}/lib Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/fcgi-0.8.8 for inspection. Results logged to /usr/lib64/ruby/gems/1.8/gems/fcgi-0.8.8/ext/fcgi/gem_make.out

<- Return to list of scripts

JT - which Linux distribution and version are you running Virtualmin on there?

Operating system CentOS Linux 5.4 Virtualmin version 3.74 Pro Webmin version 1.490

I found that the latest version of Rails requires that the fcgi-devel package be installed in order to compile the fcgi Gem. You can do this with the command :

yum install fcgi-devel

Well, that kind of worked. Problem seems to be that it wants ruby > 1.8.5.

i can not find anything in .rpm from centos and do not think I want to use outside repos just to make this work.

I had this problem a while back with another version on virtualmin, I had hoped it would be different this time.

As it is with the rpm db and the ruby rpm hell that this box has become, I will need to reinstall just to get it back to where we started.

I had kind of hoped that since when you install VM it pulls in all that it needs, and I thought this would not have been an issue. To top it off I running x86_64 so rpm's are few and far between.

If you guys can help, that would be great. If you need remote access, that can be done.

JT

Where did you see what Ruby 1.8.5 is needed? I haven't seen that on my test systems..

Unfortunately, supporting Rails in Virtualmin is tough as the dependencies keep on changing .. and often outpace the packages supplied by CentOS or other distribution vendors :-(

When it goes to install rails, it also tries to install the mysql connector. Which is fine, but mysql wants ruby > 1.8.5 and so it dies.

That's odd, because I just did a test install of the "mysql" Gem on CentOS 5.4 with Ruby 1.8.5 and it worked fine.

What error message are you getting?

Also, if you try a manual install with the following command, what happens :

gem install mysql -- --with-mysql-include=/usr/include/mysql --with-mysql-lib=/usr/lib/mysql

Are you trying this on x86_64 or x86 ?

Mine is x86_64.

JT

x86 .. but I would hope that the CentOS packages are the same on both.

What is the exact error message you are getting? Or better still, what is the full output from the gem install process?

Well I kinda scraped it all and rebuilt the server. Base CentOS v5.3 install no updates yet. I still can not install rails but now it fails for a completely different reason...

Updating Ruby Gems to latest version from 0.9.2 .. .. Gems update failed : ERROR: While executing gem ... (Gem::RemoteSourceException) HTTP Response 403 Updating RubyGems...

<- Return to list of scripts

Why would I be getting this ?

Looks like something wrong with Ruby's gem service - maybe wait a few hours, and try again.