Problem with Rails on Leopard

hi,

i have problem with Rails

when i written this command:

$ sudo gem install rails

i see this error message:

ERROR: Error installing rails:
invalid gem format for /Library/Ruby/Gems/1.8/cache/
activesupport-2.1.0.gem

,

i checked this path /Library/Ruby/Gems/1.8/cache/
and i see (activesupport-2.1.0.gem) there!

how can i solve this problem?

,

thanks

???

please help me…

Just curious, don’t know if it will help but, did you upgrade to the
lastest version of gem ? If not maybe you should try.

What David was asking was what version if gem are you using?

Type ‘gem --version’ The latest is 1.2 and has some changes that may
be the cause of your ‘invalid format’ issue. If you need to upgrade
gem itself, the command is ‘gem update --system’

hello David

thanks for ur post

before this problem
i written

$ sudo gem update

then i see this message:

Updating installed gems
Updating actionmailer
ERROR: While executing gem … (Gem::InstallError)
invalid gem format for
/Library/Ruby/Gems/1.8/cache/activesupport-2.1.0.gem

how can i solve this problem?

On Mon, Jun 30, 2008 at 10:37 PM, DavidPaquet [email protected]

Hi Cynthia,

I have the latest version of gem
1.2.0

Is there any solutions to this problem?

On Jun 30, 2008, at 5:19 PM, abdulrhman wrote:

Updating installed gems
Updating actionmailer
ERROR: While executing gem … (Gem::InstallError)
invalid gem format for /Library/Ruby/Gems/1.8/cache/
activesupport-2.1.0.gem

how can i solve this problem?

Have you tried removing the troublesome gems and re-installing?

Best.
Mike

Hi Mike

How can i do that?

Sorry. I am on Leopard with gem 1.2.0 AND all the 2.1 Rails-related
gems. I didn’t have any trouble installing. If it works now, perhaps
there were some intermittent issues - network or on the gem server?
Sorry, no ideas.

gem help command

This will give a list of all the gem commands.

gem help uninstall

will give you the help for the uninstall command.

Best.
Mike

Hi Abdulrhman,

I have the same problem and here is how i managed to make it work.

I first delete the problem gem file from the directory ‘/Library/Ruby/
Gems/1.8/cache’

$sudo rm -rf /Library/Ruby/Gems/1.8/cache/activesupport-2.1.0.gem

the i copy the file from my other Linux box (which installed the Rails
2.1) to this directory.

If you are using Ubuntu the file will be in the directory
/usr/lib/ruby/gems/1.8/cache

then i run
$sudo gem install rails

Hope that help,

– bc1806

Hi Mike

I re-installed all gem by uninstall commands

but when i tried to install Rails by this commond

$ sudo gem install -y rails

i see this message:

sudo gem install -y rails

i tried to change the permission for activesupport-2.1.0.gem to (read &
write), but no change.

i learned from this tutorial:
http://www.buildingwebapps.com/articles/17-setting-up-rails-on-leopard-mac
but there some problem with this way.

i will re-install MacPort…
maybe that can be solve the problem.

any solutions?

Hi bc1806

thank you for your help,

i install ActiveSupport Manually from RubyForge
then i replace the old file with it,
then i run this command:
$sudo gem install rails

thanks for all.

for more information:

*read the comments.