升级到rails 4.0.3后 - 找不到'minitest'(〜> 5.1)

时间:2014-02-18 22:50:52

标签: ruby-on-rails ruby-on-rails-4

为什么我的服务器不能简单地使用rails s

启动
→ rails s
/usr/local/var/rbenv/versions/2.1.0/lib/ruby/2.1.0/rubygems/dependency.rb:298:in `to_specs': Could not find 'minitest' (~> 5.1) - did find: [minitest-4.7.5] (Gem::LoadError)

→ bundle exec rails s
=> Booting Thin
=> Rails 4.0.3 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Thin web server (v1.6.1 codename Death Proof)
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop

2 个答案:

答案 0 :(得分:6)

我必须执行以下操作,现在它可以正常工作。

→ bundle clean --force
→ bundle update
→ rails s
=> Booting Thin
=> Rails 4.0.3 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Thin web server (v1.6.1 codename Death Proof)
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop

答案 1 :(得分:1)

好像在Gemfile你需要minitest (~> 5.1) 但您系统上的当前版本为4.7.5bundle update minitest 它会更新minitest版本。