2

运行后gem update,当我尝试启动 rails 时出现以下错误:

$ rails s
/usr/lib/ruby/1.9.1/rubygems.rb:238:in `activate': can't activate rack (~> 1.4.5, runtime)
for ["actionpack-3.2.12", "railties-3.2.12"], already activated rack-1.5.2 for ["rack-
ssl-1.3.3", "railties-3.2.12"] (Gem::LoadError)
    from /usr/lib/ruby/1.9.1/rubygems.rb:254:in `block in activate'
    from /usr/lib/ruby/1.9.1/rubygems.rb:253:in `each'
    from /usr/lib/ruby/1.9.1/rubygems.rb:253:in `activate'
    from /usr/lib/ruby/1.9.1/rubygems.rb:254:in `block in activate'
    from /usr/lib/ruby/1.9.1/rubygems.rb:253:in `each'
    from /usr/lib/ruby/1.9.1/rubygems.rb:253:in `activate'
    from /usr/lib/ruby/1.9.1/rubygems.rb:1065:in `gem'
    from /usr/local/bin/rails:18:in `<main>'

谁能帮助我,这意味着什么以及如何解决问题?

4

2 回答 2

6

您必须使用捆绑程序运行它。

$ bundle exec rails s

否则,您需要卸载机架版本 1.5.2。

于 2013-02-26T15:18:40.813 回答
3

删除 Gemfile.lock

然后运行

$> bundle install
于 2013-02-26T15:20:09.130 回答