我一直在寻找这个问题的答案超过一天,并且彻底搜索了StackOverflow。
我理解正在发生的冲突,我应该卸载我不需要的Rack版本,但这就是问题所在。我正在开发Koding(http://koding.com)而我无法访问系统级宝石。
Rails之前正在工作,我安装了mongo gem,删除了它,并安装了mysql2 gem。
bash4.1$ rails
/usr/lib/ruby/site_ruby/1.8/rubygems.rb:233:in `activate': can't activate rack (~> 1.4.0, runtime) for ["actionpack-3.2.11", "railties-3.2.11"
], already activated rack-1.5.0 for ["rack-ssl-1.3.2", "railties-3.2.11"] (Gem::LoadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:249:in `activate'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `each'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `activate'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:249:in `activate'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `each'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `activate'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:1082:in `
from /usr/bin/rails:18
我已经擦干了我的目录,尝试使用RVM,但仍然没有。有什么想法吗?
谢谢!
答案 0 :(得分:5)
使用Bundler根据应用程序Gemfile解析Rack依赖关系。
$ bundle exec rails
否则,删除Rack 1.5.0并重试。
$ gem uninstall rack
# select the proper version to delete