我刚刚下载了一个我试图在计算机上运行的Rails应用程序。我正在运行OS X 10.8。
我运行了安装了rails的gem install 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>'
答案 0 :(得分:0)
您可以在gemfile源代码中使用http
代替https
(http://rubygems.org
)
使用http
本身并不是问题,但它确实使您的应用程序更容易受到某些攻击。有人可以冒充http://rubygems.org
并为您提供修改后的宝石。我从来没有听说过这种攻击,但理论上它们是可能的。