开发者

Rails 3 install error: "invalid value for @cert_chain"

I'm trying to install Rails 3 on a new OS X Snow Leopard machine (with dev tools installed), and when I sudo gem install rails, I get the following error:

ERROR:  While e开发者_高级运维xecuting gem ... (Gem::FormatException)
builder-2.1.2 has an invalid value for @cert_chain

And the update fails. Has anyone seen this before? I greped the builder-2.1.2 directory for 'cert_chain,' but couldn't find any clues.

Ruby version is 1.8.7

OS X 10.6.6

Thanks!


This is an issue with Rubygems version 1.7.1. Upgrading to 1.7.2 or above, or downgrading to 1.6.2, fixes this.

To upgrade (preferred):

gem update --system

To downgrade:

gem update --system 1.6.2


Check your gem version by

gem -v

If it is 1.7.1 than downgrade rubygems by following command

gem update --system 1.6.2

It seems that new rubygem version(1.7.1) is not working with some versions of Ruby. So downgrade it.


I was able to fix this by updating ruby to 1.9.2p180. (on windows)


sudo gem update --system 1.6.2


I had the same error when trying to install rails, I agree with evan.leonard I think it a bug with v1.7.1. I downgraded rubygems to 1.6.2 and it worked, here is how to downgrade...

gem update --system 1.6.2


Worked like a charm on SL 10.6.7. Fixed my problem with getting Vagrant to install.

gem update --system 1.6.2


Had the same problem on Ubuntu 10.04 while upgrading to Rails 3:

Installing abstract (1.0.0) /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:371:in `initialize_copy': abstract-1.0.0 has an invalid value for @cert_chain (Gem::FormatException)

sudo gem update --system 1.6.2 solved the problem


Received similar error when running "bundle install" when creating new RoR application using Ruby 1.9.2 and Rails 3.0.3 and Rubygems 1.8.10.

Fix: downgrading Rubygems from 1.8.10 to 1.8.9


I see the exact same thing on a virgin install of rails on Amazon Linux (v 2010.11) with Ruby 1.8.7 and RubyGems 1.7.1.

    # gem install rails --backtrace
ERROR:  While executing gem ... (Gem::FormatException)
    builder-2.1.2 has an invalid value for @cert_chain
        /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb:371:in `initialize_copy'
        /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb:360:in `each'
        /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb:360:in `initialize_copy'
        /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb:638:in `dup'
        /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb:638:in `for_cache'
        /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb:746:in `to_ruby_for_cache'
        /usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb:234:in `write_spec'
        /usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb:175:in `install'
        /usr/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:299:in `install'
        /usr/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:270:in `each'
        /usr/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:270:in `install'
        /usr/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:120:in `execute'
        /usr/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in `each'
        /usr/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in `execute'
        /usr/lib/ruby/site_ruby/1.8/rubygems/command.rb:278:in `invoke'
        /usr/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:133:in `process_args'
        /usr/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:103:in `run'
        /usr/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:64:in `run'
        /usr/bin/gem:21


As a workaround I was able to install rails by commenting out line 371 in rubygems/specification.rb ("raise e"). (This is with rubygems 1.7.1.)


Well, I just downloaded it from: http://rubygems.org/pages/download

and then ran setup.rb in the extracted directory and then re-ran 'gem install rails'. (both with sudo if using an environment that needs it)


I downgraded to rubygems 1.6.2 and this worked for me too. 1.7.1 seems to have a bug or something.


Having the same issue on Rackspace cloud servers, going to 1.7.1 introduced the error message -- going back to 1.6.2 it went away.


Had the same problem with gem Version 1.7.2. But updating on 1.8.9 fixed it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜