1

我刚刚下载了一个我想在我的计算机上运行的 Rails 应用程序。我正在运行 OS X 10.8。

我跑了gem install rails哪个安装的rails。然后我跑进bundle install了这个项目,它一直说:Abort Trap: 6.

然后我跑了rails server,显然rake失踪了。于是我跑了gem install rake。现在,当我跑步时rails server,我发现activesupport-3.2.9它不见了。我跑了gem install activesupport,但是安装了activesupport-3.2.11,所以 3.2.9 仍然丢失。我尝试运行gem install activesupport-3.2.9,但它说找不到该版本。

为什么会这么乱?我想我做错了。如何一次安装所有依赖项并解决我的问题?

bundle install错误:

185 /Users/nayef/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/openssl/buffering.rb
  186 /Users/nayef/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin11.4.0/fcntl.bundle
  187 /Users/nayef/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/openssl/ssl-internal.rb
  188 /Users/nayef/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/openssl/x509-internal.rb
  189 /Users/nayef/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/openssl.rb
  190 /Users/nayef/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/https.rb

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Abort trap: 6

rails错误:

/Users/nayef/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/spec_set.rb:90:in `block in materialize': Could not find activesupport-3.2.9 in any of the sources (Bundler::GemNotFound)
        from /Users/nayef/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/spec_set.rb:83:in `map!'
        from /Users/nayef/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/spec_set.rb:83:in `materialize'
        from /Users/nayef/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/definition.rb:127:in `specs'
        from /Users/nayef/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.4/lib/bundler/environment.rb:27:in `specs'
        from /Users/nayef/.rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:41:in `candidate?'
        from /Users/nayef/.rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:60:in `setup'
        from /Users/nayef/.rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:75:in `<top (required)>'
        from /Users/nayef/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
        from /Users/nayef/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
        from /Users/nayef/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
        from /Users/nayef/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:9:in `<main>'
4

1 回答 1

0

您可以在 gemfile 源 ( )中使用http而不是httpshttp://rubygems.org

使用http本身不是问题,但它确实使您的应用程序更容易受到某些攻击。有人可以冒充http://rubygems.org并为您提供修改后的宝石。我从未听说过这样的攻击,但它们在理论上是可能的。

于 2013-01-23T14:28:18.250 回答