Rails 3 安装错误:“@cert_chain 值无效”

发布于 2024-10-29 04:00:09 字数 367 浏览 2 评论 0原文

我尝试在新的 OS X Snow Leopard 计算机(安装了开发工具)上安装 Rails 3,当我 sudo gem install Rails 时,出现以下错误:

ERROR:  While executing gem ... (Gem::FormatException)
builder-2.1.2 has an invalid value for @cert_chain

并且更新失败。有人见过这个吗?我在 builder-2.1.2 目录中 grep 查找“cert_chain”,但找不到任何线索。

Ruby 版本是 1.8.7

OS X 10.6.6

谢谢!

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 executing 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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(14

∞梦里开花 2024-11-05 04:00:10

在Ubuntu 10.04上升级到Rails 3时遇到同样的问题:

安装抽象(1.0.0)/usr/local/lib/ruby/site_ruby/1.8/rubygems/specation.rb:371:in `initialize_copy':abstract-1.0。 0 有一个无效的 @cert_chain 值 (Gem::FormatException)

sudo 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

就像说晚安 2024-11-05 04:00:10

使用 Ruby 1.9.2、Rails 3.0.3 和 Rubygems 1.8.10 创建新的 RoR 应用程序时运行“bundle install”时收到类似的错误。

修复:将 Rubygems 从 1.8.10 降级到 1.8.9

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

帅冕 2024-11-05 04:00:10

我在 Amazon Linux (v 2010.11) 上使用 Ruby 1.8.7 和 RubyGems 1.7.1 的原始安装的 Rails 中看到了完全相同的情况。

    # 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

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
孤单情人 2024-11-05 04:00:10

作为一种解决方法,我可以通过注释 ruby​​gems/specification.rb 中的第 371 行(“raise e”)来安装 Rails。 (这是 ruby​​gems 1.7.1 的情况。)

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

辞取 2024-11-05 04:00:10

好吧,我刚刚从以下位置下载它: http://rubygems.org/pages/download

然后运行安装程序.rb 在提取的目录中,然后重新运行“gem install Rails”。 (如果使用需要 sudo 的环境,则两者都需要)

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)

陌生 2024-11-05 04:00:10

我降级到 ruby​​gems 1.6.2,这也对我有用。 1.7.1好像有bug什么的。

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

深巷少女 2024-11-05 04:00:10

Rackspace 云服务器上也有同样的问题,转到 1.7.1 会出现错误消息 - 返回到 1.6.2 错误消息就消失了。

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.

纸短情长 2024-11-05 04:00:10

gem 版本 1.7.2 也有同样的问题。
但更新 1.8.9 修复了这个问题。

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

饮湿 2024-11-05 04:00:09

这是RubyGems版本1.7.1的问题。升级到1.7.2或更高,或降级至1.6.2,请修复此问题。

升级(首选):

gem update --system

降级:

gem update --system 1.6.2

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
我的影子我的梦 2024-11-05 04:00:09

检查你的 gem 版本

gem -v

如果它是 1.7.1,然后通过以下命令降级 ruby​​gem

gem update --system 1.6.2

似乎新的 ruby​​gem 版本(1.7.1)不适用于某些版本的 Ruby。所以降级了。

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.

缺⑴份安定 2024-11-05 04:00:09

我通过将 ruby​​ 更新到 1.9.2p180 解决了这个问题。 (在窗户上)

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

我不咬妳我踢妳 2024-11-05 04:00:09

sudo gem update --system 1.6.2

sudo gem update --system 1.6.2

贱人配狗天长地久 2024-11-05 04:00:09

我在尝试安装 Rails 时遇到了同样的错误,我同意 evan.leonard 我认为这是 v1.7.1 的错误。我将 ruby​​gems 降级到 1.6.2 并且它起作用了,以下是如何降级...

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

↙温凉少女 2024-11-05 04:00:09

在 SL 10.6.7 上表现得非常出色。解决了安装 Vagrant 时出现的问题。

宝石更新--系统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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文