Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Rspec/Rake path problem - load error

I am using the treehouse vm, ruby 2.1.0x64, rails 4.2.0, rspec & rspec-rails 3.1.0 & rake 10.4.2. I am doing the odot project, and trying to code a test script. When I run bundle exec rake db:migrate --trace, I receive this error msg:

C:\Users\AnnieD\treehouse\odot (master)
λ bundle exec rake db:migrate --trace
DL is deprecated, please use Fiddle
DL is deprecated, please use Fiddle
rake aborted!
LoadError: cannot load such file -- rspec/core
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rspec-3.1.0/lib/rspec.rb:1:in `require'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rspec-3.1.0/lib/rspec.rb:1:in `<top (required)>'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.10/lib/bundler/runtime.rb:76:in `require'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.10/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.10/lib/bundler/runtime.rb:72:in `each'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.10/lib/bundler/runtime.rb:72:in `block in require'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.10/lib/bundler/runtime.rb:61:in `each'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.10/lib/bundler/runtime.rb:61:in `require'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.10/lib/bundler.rb:134:in `require'
C:/Users/AnnieD/treehouse/odot/config/application.rb:7:in `<top (required)>'
C:/Users/AnnieD/treehouse/odot/Rakefile:4:in `require'
C:/Users/AnnieD/treehouse/odot/Rakefile:4:in `<top (required)>'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load_rakefile'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:689:in `raw_load_rakefile'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:94:in `block in load_rakefile'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:93:in `load_rakefile'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:77:in `block in run'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
C:/Ruby21-x64/bin/rake:23:in `load'
C:/Ruby21-x64/bin/rake:23:in `<main>'

I believe I have a path problem because rspec installs itself in the directory rspec-3.1.0, not respec. In addition, rake is installed with rspec-rails.

I have changed the file 'rspec.rake' to include this path rather than rspec:

rake-10.4.2/test/test_rake_task

Also changed 'rspec-rails.rb': rspec-rails-3.1.0/lib/rspec/rails/tasks/rspec.rake

My question is: Can I add or change a 'require' statement in these files that will clear up all of these load errors.

Thanks.