2012年1月19日木曜日

[rails] `activate': can't activate rack

新しいrailsアプリを作ろうとしたらこんなエラーが出る。

$ rails new myapp --skip-active-record
/usr/lib/ruby/1.8/rubygems.rb:233:in `activate': can't activate rack (~> 1.3.5, runtime) for ["actionpack-3.1.3", "rails-3.1.3"], already activated rack-1.4.0 for ["rack-cache-1.1", "actionpack-3.1.3", "rails-3.1.3"] (Gem::LoadError)
 from /usr/lib/ruby/1.8/rubygems.rb:249:in `activate'
 from /usr/lib/ruby/1.8/rubygems.rb:248:in `each'
 from /usr/lib/ruby/1.8/rubygems.rb:248:in `activate'
 from /usr/lib/ruby/1.8/rubygems.rb:249:in `activate'
 from /usr/lib/ruby/1.8/rubygems.rb:248:in `each'
 from /usr/lib/ruby/1.8/rubygems.rb:248:in `activate'
 from /usr/lib/ruby/1.8/rubygems.rb:1082:in `gem'
 from /var/lib/gems/1.8/bin/rails:18

そんなときはrackを消してしまえ〜
$ sudo gem uninstall rack -v 1.4.0

You have requested to uninstall the gem:
 rack-1.4.0
rack-mount-0.8.3 depends on [rack (>= 1.0.0)]
actionpack-3.2.0.rc2 depends on [rack (~> 1.4.0)]
sprockets-2.0.3 depends on [rack (~> 1.0)]
sprockets-2.1.2 depends on [rack (~> 1.0)]
rack-test-0.6.1 depends on [rack (>= 1.0)]
rack-cache-1.1 depends on [rack (>= 0.4)]
rack-ssl-1.3.2 depends on [rack (>= 0)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn]  y
Successfully uninstalled rack-1.4.0

0 件のコメント:

コメントを投稿