15

我是 Rails 的新手,而 litelarry 正在尝试设置一个 helloworld 应用程序来弄湿我的脚。

我安装了 homebrrew、ruby build 和 rbenv。我安装了 pow,然后卸载了它。基本上玩了一圈,然后搞定了怎么做一个应用程序,精彩。我创建了helloworld。

我知道 minitest (5.0.8, 4.3.2) 安装在我的主目录中。

我 cd 进入 helloworld 目录,并尝试通过键入 rails -s 使应用程序处于活动状态。

我得到这个最小的错误?

/Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-      1.3.5/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find minitest-4.7.5 in any of the sources (Bundler::GemNotFound)
from /Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `map!'
from /Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `materialize'
from /Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in `specs'
from /Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/definition.rb:159:in `specs_for'
from /Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/definition.rb:148:in `requested_specs'
from /Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/environment.rb:18:in `requested_specs'
from /Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:13:in `setup'
from /Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
from /Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rubygems-bundler-1.3.4/lib/rubygems-bundler/noexec.rb:74:in `setup'
from /Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rubygems-bundler-1.3.4/lib/rubygems-bundler/noexec.rb:103:in `check'
from /Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rubygems-bundler-1.3.4/lib/rubygems-bundler/noexec.rb:109:in `<top (required)>'
from /Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `require'
from /Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
from /Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require'
from /Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rubygems-bundler-1.3.4/lib/rubygems_executable_plugin.rb:4:in `block in <top (required)>'
from /Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/executable-hooks-1.2.4/lib/executable-hooks/hooks.rb:50:in `call'
from /Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/executable-hooks-1.2.4/lib/executable-hooks/hooks.rb:50:in `block in run'
from /Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/executable-hooks-1.2.4/lib/executable-hooks/hooks.rb:49:in `each'
from /Users/smithy/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/executable-hooks-1.2.4/lib/executable-hooks/hooks.rb:49:in `run'
from /Users/smithy/.rbenv/versions/2.0.0-p247/bin/ruby_executable_hooks:10:in `<main>'

据我所知,它与捆绑器有关,我得到的 minitest4.7.5 丢失了。但是我如何看到安装了 minitest 5.0 等。

任何帮助将不胜感激。

4

1 回答 1

38

根据这个关于bundler 版本 1.5.0的链接,你应该将你的 bundler 升级到 1.5.1 或更高版本,以修复一个在 Ruby 1.9 和 2.0 中出现在默认 gem 中的讨厌的小错误。我只是在运行bundle install之前运行了gem update bundler ,现在一切似乎都很好。

于 2013-12-29T21:36:37.390 回答