2013-01-22 217 views
1

我剛剛下載了一個Rails應用程序,試圖在我的電腦上運行。我正在運行OS X 10.8。我跑gem install rails安裝導軌。然後,我在該項目中運行bundle install,並且一直放棄說:Abort Trap: 6Rails安裝依賴項

然後我跑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/[email protected]/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/[email protected]/gems/bundler-1.1.4/lib/bundler/spec_set.rb:83:in `map!' 
     from /Users/nayef/.rvm/gems/[email protected]/gems/bundler-1.1.4/lib/bundler/spec_set.rb:83:in `materialize' 
     from /Users/nayef/.rvm/gems/[email protected]/gems/bundler-1.1.4/lib/bundler/definition.rb:127:in `specs' 
     from /Users/nayef/.rvm/gems/[email protected]/gems/bundler-1.1.4/lib/bundler/environment.rb:27:in `specs' 
     from /Users/nayef/.rvm/gems/[email protected]/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:41:in `candidate?' 
     from /Users/nayef/.rvm/gems/[email protected]/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:60:in `setup' 
     from /Users/nayef/.rvm/gems/[email protected]/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>' 
+3

請再次運行'bundle install'並粘貼完整的錯誤消息。 – gmalette

+0

@gmalette它只是一箇中止陷阱6.看到上面,我複製並粘貼它。 – darksky

+0

@gmalette剛剛在運行'rails'時添加了錯誤信息 – darksky

回答

0

你可以在你的Gemfile源使用http代替httpshttp://rubygems.org

使用http本身並不是一個問題,但它確實會讓您的應用程序更容易受到某些限制攻擊。有人可以冒充http://rubygems.org併爲您提供修改後的寶石。我從來沒有聽說過這種攻擊,但它們在理論上是可能的。