我最初加入gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git'
我的Gemfile,但我得到這個錯誤:問題安裝Rails_Admin
Bundler could not find compatible versions for gem "rails":
In snapshot (Gemfile.lock):
rails (3.0.4)
In Gemfile:
rails_admin depends on
rails (~> 3.0.7)
所以我更新到3.0.7軌道並安裝rails_admin (0.0.1) from git://github.com/sferik/rails_admin.git (at master)
我在控制檯中運行rake rails_admin:install
和我這個錯誤:
rake aborted!
undefined method `task'
以下是完整的跟蹤:
/Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:215:in `initialize_tasks'
/Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:139:in `load_tasks'
/Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:77:in `send'
/Library/Ruby/Gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:77:in `method_missing'
/rubyprograms/dreamstill/Rakefile:7
/Library/Ruby/Gems/1.8/gems/rake-0.9.0/lib/rake/rake_module.rb:25:in `load'
/Library/Ruby/Gems/1.8/gems/rake-0.9.0/lib/rake/rake_module.rb:25:in `load_rakefile'
/Library/Ruby/Gems/1.8/gems/rake-0.9.0/lib/rake/application.rb:495:in `raw_load_rakefile'
/Library/Ruby/Gems/1.8/gems/rake-0.9.0/lib/rake/application.rb:78:in `load_rakefile'
/Library/Ruby/Gems/1.8/gems/rake-0.9.0/lib/rake/application.rb:129:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.0/lib/rake/application.rb:77:in `load_rakefile'
/Library/Ruby/Gems/1.8/gems/rake-0.9.0/lib/rake/application.rb:61:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.9.0/lib/rake/application.rb:129:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.0/lib/rake/application.rb:59:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.9.0/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
發生了什麼事以及如何安裝rails_admin?
只要使用「未定義的方法任務」直接鏈接到堆棧溢出問題作爲第一個結果。 – 2011-05-30 08:21:27