Ruby on Rails install script on virtualmin pro

9 posts / 0 new
Last post
#1 Fri, 10/12/2007 - 09:17
jaldeguer

Ruby on Rails install script on virtualmin pro

I'm getting this error when running the install script.

Rails GEM install failed :

ERROR: While executing gem ... (OpenURI::HTTPError) 404 Not Found

  • Joe
Fri, 10/12/2007 - 13:40
Joe
Joe's picture

Hmm...That's a strange one. It makes me think the Ruby gems server is broken. I'll look into it...it could also be that we're doing something stupid or maybe missing some sort of updatee step. But I thought tthe gems db updated everytime you used it non-locally.

What happens if you run the following on the command line:

gem sources -l

--

Check out the forum guidelines!

Fri, 10/12/2007 - 15:39 (Reply to #2)
jaldeguer

Hi Joe,

This is what I get running gem sources -l

/usr/local/lib/site_ruby/1.8/rubygems/source_info_cache.rb:153:in `dump': failed to allocate memory (NoMemoryError)
from /usr/local/lib/site_ruby/1.8/rubygems/source_info_cache.rb:153:in ` write_cache'
from /usr/local/lib/site_ruby/1.8/rubygems/source_info_cache.rb:152:in ` write_cache'
from /usr/local/lib/site_ruby/1.8/rubygems/source_info_cache.rb:98:in `f lush'
from /usr/local/lib/site_ruby/1.8/rubygems/source_info_cache.rb:114:in ` refresh'
from /usr/local/lib/site_ruby/1.8/rubygems/source_info_cache.rb:41:in `c ache'
from /usr/local/lib/site_ruby/1.8/rubygems/source_info_cache.rb:46:in `c ache_data'
from /usr/local/lib/site_ruby/1.8/rubygems/commands/sources_command.rb:7 4:in `execute'
from /usr/local/lib/site_ruby/1.8/rubygems/command.rb:70:in `invoke'
from /usr/local/lib/site_ruby/1.8/rubygems/command_manager.rb:121:in `pr ocess_args'
from /usr/local/lib/site_ruby/1.8/rubygems/command_manager.rb:92:in `run '
from /usr/local/lib/site_ruby/1.8/rubygems/gem_runner.rb:30:in `run'
from /usr/bin/gem:23

Fri, 10/12/2007 - 15:46 (Reply to #3)
jaldeguer

After waiting a couple of hours I tried the install script one more time. It went further this time stopping at this error:

Now installing Ruby on Rails version 1.2.3 ..

Rails MySQL driver install failed :

Bulk updating Gem source index for: http://gems.rubyforge.org
Select which gem to install for your platform (i486-linux)
1. mysql 2.7.3 (mswin32)
2. mysql 2.7.1 (mswin32)
3. mysql 2.7 (ruby)
4. mysql 2.6 (ruby)
5. Skip this gem
6. Cancel installation
> 3
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

ruby extconf.rb install mysql --include-dependencies

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

Fri, 10/12/2007 - 15:49 (Reply to #4)
Joe
Joe's picture

You've got all sorts of trouble there. ;-)

Obviously, you're short of memory.

Is this a VPS of some sort? (Virtuozzo/OpenVZ has a notorious and nasty memory bug that has been present for well over a year...if the system is over-subscribed, at all, it'll lead to mysterious memory allocation errors.)

--

Check out the forum guidelines!

Fri, 10/12/2007 - 16:15 (Reply to #5)
jaldeguer

Yes, it is running as an Ubuntu 6.06 VPS using OpenVZ, I have a dedicated ram of 256 with burstable ram of 512.

I went ahead and installed rails via apt-get, which worked fine. Also after reading online the recommended way to install gems is via source, I went ahead and did it that way.

To get around the mysql error I posted earlier I installed it successfully using.

apt-get install mysql-server libmysqlclient15-dev libmysql-ruby1.8
gem install mysql

My test shows it now has mysql:
irb(main):002:0> require 'mysql'
=> true

I have rails running now, but I wanted to see how the install script sets up Apache2, Mongrel etc..

According to my hosting company they don't over-subscribe but I can't verify it.

Tue, 10/16/2007 - 17:53 (Reply to #6)
jaldeguer

Yep, I have also ran into the same error before. Doing an apt-get install ruby1.8-dev was the solution.

Mon, 10/15/2007 - 21:29
DanielPacker

I'm having a slightly different problem with the MySQL driver on Debian Etch w/ Virtualmin Pro 3.47.

Now installing Ruby on Rails version 1.2.3 ..

Rails MySQL driver install failed :

Select which gem to install for your platform (i486-linux)
1. mysql 2.7.3 (mswin32)
2. mysql 2.7.1 (mswin32)
3. mysql 2.7 (ruby)
4. mysql 2.6 (ruby)
5. mysql 2.5.1 (ruby)
6. Cancel installation
> 3
Building native extensions. This could take a while...
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1

ERROR: While executing gem ... (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in /var/lib/gems/1.8/gems/mysql-2.7 for inspection.

Results logged to /var/lib/gems/1.8/gems/mysql-2.7/gem_make.out

Running a second time without the MySQL setup options yields:

Now installing Ruby on Rails version 1.2.3 ..

Rails setup failed :

/bin/sh: rails: command not found

Tue, 10/16/2007 - 12:22 (Reply to #8)
DanielPacker

From a post on installing ROR on debian:
http://daniel.lorch.cc/docs/rails_install_debian/

"extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)"

This probably means that you forgot to install the ruby1.8-dev package. Just do an apt-get install ruby1.8-dev to fix this.

so... Missing dependency?

Topic locked