开发者

Problem installing Rails_Admin

开发者 https://www.devze.com 2023-03-09 08:19 出处:网络
I initially added gem \'rails_admin\', :git => \'git://github.com/sferik/rails_admin.git\' to my gemfile but I got this error:

I initially added gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git' to my gemfile but I got this error:

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)

so I updated to rails 3.0.7 and installed rails_admin (0.0.1) from git://github.com/sferik/rails_admin.git (at master)

I run rake rails_admin:install in the console and I get this error:

rake aborted!
undefined method `task'

Here is the full trace:

/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/li开发者_Go百科b/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

What's going on and how do I get rails_admin installed?


This is a known problem with rake 0.9. To fix it, just do the following:

  • Uninstall rake 0.9: gem uninstall rake -v 0.9
  • Add this to your gemfile: gem 'rake', '~> 0.8.7
  • Update the bundle: bundle update

And you should be good to go.

0

精彩评论

暂无评论...
验证码 换一张
取 消