You have already activated rake 0.9.0, but your Ge

2019-01-12 17:02发布

I'm trying to run rails project, I get

Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

If I do: "bundle install"

but I'm getting

You have already activated rake 0.9.0, but your Gemfile requires rake 0.8.7

while doing

rake db:migrate

9条回答
甜甜的少女心
2楼-- · 2019-01-12 18:00

Add this to your Gemfile

# Rake 0.9.0 break Rails.
gem "rake", "!= 0.9.0"

And then uninstall rake-0.9.0

查看更多
祖国的老花朵
3楼-- · 2019-01-12 18:07

Oh look, it's the future. For me, it was complaining I had rake 10.x installed when it wanted 0.9.5. Not quite sure, not familiar enough with Ruby to really dig into what happened to the recent version numbers, but what I did was:

gem uninstall rake
gem install rake -v 0.9.5

to force the system to install the version of rake that the app wanted (for me it was Octopress).

查看更多
迷人小祖宗
4楼-- · 2019-01-12 18:08

I thank to Dobry Den, cheers dude. but little more I had to do. here is solution (works for me). I had added

gem 'rake','0.8.7'

on Gemfile, which was not there, but my new version of rails automatically install rake(0.9.0).

after I had delete rake0.9.0 by gem uninstall rake and after doing bundle update rake , I can create and migrate database.

查看更多
登录 后发表回答