简体   繁体   中英

Rails error after updating gems

After running gem update , I get the following error, when I try to start 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>'

Can anyone please help me, what this means and how to solve the problem?

You must run it using bundler.

$ bundle exec rails s

Otherwise, you need to uninstall the rack version 1.5.2.

delete Gemfile.lock

then run

$> bundle install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM