Question

Ok, this is very weird. I'm trying to do a database migration, and all of a sudden, I'm getting these errors:

[C:\source\fe]: rake db:migrate --trace
(in C:/source/fe)
** Invoke db:migrate (first_time)
** Invoke setup (first_time)
** Invoke gems:install (first_time)
** Invoke gems:set_gem_status (first_time)
** Execute gems:set_gem_status
** Execute gems:install
rake aborted!
can`'t activate rake (> 0.0.0), already activated rake-0.8.3]
c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:139:in `activate'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:155:in `activate'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:154:in `each'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:154:in `activate'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:49:in `gem'
C:/source/fe/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:36:in `add_load_paths'
C:/source/fe/config/../vendor/rails/railties/lib/initializer.rb:245:in `add_gem_load_paths'
C:/source/fe/config/../vendor/rails/railties/lib/initializer.rb:245:in `each'
C:/source/fe/config/../vendor/rails/railties/lib/initializer.rb:245:in `add_gem_load_paths'
C:/source/fe/config/../vendor/rails/railties/lib/initializer.rb:97:in `send'
C:/source/fe/config/../vendor/rails/railties/lib/initializer.rb:97:in `run'
C:/source/fe/config/gems.rb:45:in `init_dependencies'
C:/source/fe/lib/tasks/overridegems.rake:15
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain'
c:/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:588:in `invoke_prerequisites'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `invoke_prerequisites'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:577:in `invoke_with_call_chain'
c:/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:588:in `invoke_prerequisites'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `invoke_prerequisites'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:577:in `invoke_with_call_chain'
c:/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in `invoke'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in `invoke_task'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in `top_level'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
c:/ruby/bin/rake:19:in `load'
c:/ruby/bin/rake:19
[C:\source\fe]:

Any suggestions? I've tried uninstalling and reinstalling rake, as well as updating rails.

FYI, I'm using Gem 1.1.1.

I've also tried gem update rails, gem update rake and just about anything else.

Was it helpful?

Solution

Interestingly, the solution here was that i needed to downgrade my rake version. The local version (in my C:\ruby dir) was overriding the one in the source directory, and couldn't be loaded. I had done gem update and updated all my local gems.

The commands were:

gem uninstall rake
gem install rake -v ('= 1.5.1')

OTHER TIPS

I had a problem similar to this, which I ended up working around by hacking my rails version to not initialize active resource (by modifying the components method in /rails/railties/builtin/rails_info/rails/info.rb )

This is clearly a hack, but I didn't have a chance to work out why active_resource specifically was causing the rake conflict, and since I wasn't using active_resource anyway, it got me through the night.

rake aborted!
can`'t activate rake

It is mid-Autumn - perhaps too many leaves have fallen and the rake can't be used. Try using the leaf-blower instead.

Next time, keep up with the raking to prevent this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top