PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > Problem with installing gems via rubygems.
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Problem with installing gems via rubygems.

Réponse
 
LinkBack Outils de la discussion
Vieux 08/01/2008, 11h00   #1
dizz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Problem with installing gems via rubygems.

Hey I am having a problem installing rails on my ubuntu machine. I
cannot install any gems and keep on getting the following error.

ERROR: Error installing rails:
invalid gem format for /usr/lib/ruby/gems/1.8/cache/
activerecord-2.0.2.gem

I have tried updating rubygems, manually installing rubygems (not
using synaptic) and still cannot get ruby gems to work.

It would be great if anybody could give me a hand.

Thanks
  Réponse avec citation
Vieux 12/01/2008, 10h26   #2
Eric Hodel
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Problem with installing gems via rubygems.

On Jan 8, 2008, at 03:04 AM, dizz wrote:

> Hey I am having a problem installing rails on my ubuntu machine. I
> cannot install any gems and keep on getting the following error.
>
> ERROR: Error installing rails:
> invalid gem format for /usr/lib/ruby/gems/1.8/cache/
> activerecord-2.0.2.gem
>
> I have tried updating rubygems, manually installing rubygems (not
> using synaptic) and still cannot get ruby gems to work.
>
> It would be great if anybody could give me a hand.


Try deleting that file.

  Réponse avec citation
Vieux 12/01/2008, 12h29   #3
Romulo Ceccon
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Problem with installing gems via rubygems.

Hi.

dizz wrote:
> Hey I am having a problem installing rails on my ubuntu machine. I
> cannot install any gems and keep on getting the following error.
>
> ERROR: Error installing rails:
> invalid gem format for /usr/lib/ruby/gems/1.8/cache/
> activerecord-2.0.2.gem
>
> I have tried updating rubygems, manually installing rubygems (not
> using synaptic) and still cannot get ruby gems to work.
>
> It would be great if anybody could give me a hand.


Since one of the latest Rails versions I have had the same problem on my
Windows box (actually that happens only when trying to install a second
rails version on the same machine). I do the following to workaround it:

1. Manually download the Rails gem at
https://rubyforge.org/frs/?group_id=307
2. Unpack it with `gem unpack rails-X.X.X.gem`
3. Search the Rakefile file inside the unpacked dir for lines that start
with s.add_dependency
4. Manually download all the dependencies at rubyforge (each one has its
own project)
5. Install each one with `gem install xxx.gem`. For Rails 2.0.1 the
appropriate order is: activesupport, actionpack, actionmailer,
activerecord, actionresource, rake, rails.

And whenever you have an issue with gem, trying updating it first: `gem
update --system`. That usually solves many problems.

Regards,
Romulo A. Ceccon



--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 12/01/2008, 14h20   #4
Daniel Brumbaugh Keeney
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Problem with installing gems via rubygems.

On Jan 12, 2008 6:29 AM, Romulo Ceccon <rubyforums@romulo.e4ward.com> wrote:
> dizz wrote:
> > Hey I am having a problem installing rails on my ubuntu machine.



> And whenever you have an issue with gem, trying updating it first: `gem
> update --system`. That usually solves many problems.
>
> Regards,
> Romulo A. Ceccon


Only do gem update --system if you didn't install rubygems via the
deb package. If you installed it with a .deb package (eg. with
syntaptic), doing so will break rubygems.

Daniel Brumbaugh Keeney

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 20h56.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12010 seconds with 12 queries