bundle exec rake db:create:all, errors caused by 2 different versions of rake gem, not sure where to go from here

StackOverflow https://stackoverflow.com/questions/18539890

Pregunta

I'm trying to bundle exec rake db:create:all

I found that I have two versions of the rake gem:

rake (10.1.0, 0.9.6)
    Author: Jim Weirich
    Homepage: http://rake.rubyforge.org
    License: MIT
    Installed at (10.1.0): /Users/david/.rvm/gems/ruby-2.0.0-p247@global
                 (0.9.6, default): /Users/david/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0

I think there may be an issue with the two different locations of the gems; 10.1 is at @global, and 0.9.6 is not. I think the solution may lay here because...

The trace first looks at the directories in 0.9.6 and then the last two lines look in 10.1:

dn0a158988:portfolio davidngo$ bundle exec rake db:create:all --trace
rake aborted!
cannot load such file -- /Users/davidngo/Desktop/Coding/RoR_Practice/portfolio/config/boot
/Users/davidngo/Desktop/Coding/RoR_Practice/portfolio/config/application.rb:1:in `require'
/Users/davidngo/Desktop/Coding/RoR_Practice/portfolio/config/application.rb:1:in `<top (required)>'
/Users/davidngo/Desktop/Coding/RoR_Practice/portfolio/Rakefile:5:in `require'
/Users/davidngo/Desktop/Coding/RoR_Practice/portfolio/Rakefile:5:in `<top (required)>'
/Users/davidngo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rake/rake_module.rb:25:in `load'
/Users/davidngo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rake/rake_module.rb:25:in `load_rakefile'
/Users/davidngo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rake/application.rb:604:in `raw_load_rakefile'
/Users/davidngo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rake/application.rb:89:in `block in load_rakefile'
/Users/davidngo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rake/application.rb:160:in `standard_exception_handling'
/Users/davidngo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rake/application.rb:88:in `load_rakefile'
/Users/davidngo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rake/application.rb:72:in `block in run'
/Users/davidngo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rake/application.rb:160:in `standard_exception_handling'
/Users/davidngo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/rake/application.rb:70:in `run'
/Users/davidngo/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-0.9.6/bin/rake:37:in `<top (required)>'
/Users/davidngo/.rvm/gems/ruby-2.0.0-p247@global/bin/rake:23:in `load'
/Users/davidngo/.rvm/gems/ruby-2.0.0-p247@global/bin/rake:23:in `<main>'
/Users/davidngo/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
/Users/davidngo/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>'
  • I specified in my Gemfile `gem 'rake', '0.9.6'
  • I ran bundle update to update the Gemlock file

Thank you in advance -- any help would be appreciated!

Thought: I'm going to try to uninstall the 10.1 version of rake and see if it'll work.

¿Fue útil?

Solución

I don't think it's the multiple versions of rake. The bundle exec bit should do the right thing. Are you missing the /config/boot.rb file referred to at /config/application.rb:1?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top