Welcome Guest | Login

Error installing any gem

Hello,
I'm following the doc 'Install and freeze your own RubyGems'. After creating the .gems directory in my root directory I get the following error no matter what gem I attempt to download.

gem install rails -v=2.0.2 -i ~/.gems
ERROR:  could not find rails locally or in a repository

gem install avatar -i ~/.gems
ERROR:  could not find avatar locally or in a repository

Could someone tell me what I'm doing wrong?

Thanks

2008-09-07 02:59 AM

You need to download the gem to your ~/.gems directory first.
----------
wget http://rubyforge.org/frs/download.php/29554/rails-2.0.2.gem

Then issue the command

gem install rails -v=2.0.2 -i ~/.gems

2008-09-07 06:06 AM

Thanks for the response Santhi,
I thought that since most all the gems I need are already on the Hostingrails server I could just 'copy' them to my .gems directory and proceed from there. I'm a newbie at this (can you tell?)

I tried your wget command with the results below.

wget http://rubyforge.org/frs/download.php/29554/rails-2.0.2.gem
--14:28:40--   http://rubyforge.org/frs/download.php/29554/rails-2.0.2.gem
Resolving rubyforge.org... failed: Name or service not known.

2008-09-07 01:29 PM

Can you try this out now. There was a issue with the server dns setting which is fixed now.

2008-09-07 03:10 PM

Regards,
Rahul
The wget is working now for the 2.0.2 gem.  When I try any other gem it connects fine and says it's saving ok but the gem file is 0 bytes.

File is 0 bytes weather the version asked for is 2.5.1 (old) or 2.5.2 (current)

wget http://rubyforge.org/frs/download.php/29554/rmagick-2.5.1.gem
--19:28:50--   http://rubyforge.org/frs/download.php/29554/rmagick-2.5.1.gem
Resolving rubyforge.org... 205.234.109.19
Connecting to rubyforge.org|205.234.109.19|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 0 [text/html]
Saving to: `rmagick-2.5.1.gem'

   [ <=>                                              ] 0           --.-K/s   in 0s    

19:28:51 (0.00 B/s) - `rmagick-2.5.1.gem' saved [0/0]

2008-09-07 06:33 PM

This can happen when the rmagick gem or any other specified gem is not present/available in this repository "rubeforge.org". Please find alternate links corresponding to these gems and download the required gem versions. Try the below link for rmagick-2.5.2

http://files.rubyforge.vm.bytemark.co.uk/rmagick/rmagick-2.5.2.gem

2008-09-07 08:01 PM

Regards,
Rahul
The alternate site worked!  I successfully downloaded rmagick.  Unfortunately (didn't you just know there'd be an 'unfortunately')  I now get this error when I do a gem install with rmagick;

gem install rmagick -i ~/.gems
Bulk updating Gem source index for: http://gems.rubyforge.org/
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
       ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb install rmagick -i /home/MYSITE/.gems
checking for Ruby version >= 1.8.2... yes
checking for gcc... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.3.0... yes
checking for HDRI disabled version of ImageMagick... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for magick/MagickCore.h... no
Can't install RMagick 2.5.2. Can't find MagickCore.h.

*** 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.

2008-09-09 10:05 PM

To install Rmagic, you need to compile ImageMagic on the server. As a user you don't have privilege to do that so it's better to use the Rmagic gem (2.5.2) installed globally on the server.

2008-09-10 12:49 AM

HostingRails Support

Hello Guest! In order to post you must be an active client with us, please log in or sign up.