Gem bundler install 提示 rake 版本不对

yakczh · 2014年08月05日 · 最后由 pmyangliu 回复于 2016年06月17日 · 5165 次阅读

Gem::LoadError: You have already activated rake 10.3.1, but your Gemfile require s rake 10.1.1. Prepending bundle exec to your command may solve this. e:/redmine/redmine-2.5.2/config/boot.rb:6:in <top (required)>' e:/redmine/redmine-2.5.2/config/application.rb:1:in' e:/redmine/redmine-2.5.2/Rakefile:5:in `' (See full trace by running task with --trace)

Prepending bundle exec to your command may solve this.

bundle exec 'rails s' in windows, don't forget the comma.

删除不用的 rake gem uninstall rake 或者在每个命令前加 bundle exec

我也遇到了这样的情况,也使用了大家提供的方法,但仍然提示 rake aborted,求助大家帮忙😂 提示代码如下: localhost:octopress Siri$ rake install rake aborted! Gem::LoadError: You have already activated rake 11.2.2, but your Gemfile requires rake 10.5.0. Prepending bundle exec to your command may solve this. /Users/Siri/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:35:in block in setup' /Users/Siri/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:20:inmap' /Users/Siri/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:20:in setup' /Users/Siri/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler.rb:95:insetup' /Users/Siri/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/setup.rb:9:in <top (required)>' /Users/Siri/octopress/Rakefile:2:in' /Users/Siri/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/exe/rake:27:in <top (required)>' LoadError: cannot load such file -- bundler/setup /Users/Siri/octopress/Rakefile:2:in' /Users/Siri/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/exe/rake:27:in `' (See full trace by running task with --trace)

需要 登录 后方可回复, 如果你还没有账号请 注册新账号