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 trialTrevin Cole
377 PointsLoad Error when trying to run test.
I'm on Windows with Rails 2.1.7. When I try and run rspec spec\features\todo_lists\create_spec.rb it returns a string of info and a <Load Error>. What is happening and how can I fix it?
Trevin Cole
377 PointsSorry, was in a rush earlier and just noticed that I didn't paste the full error. This is the error in it's entirety.
I wasn't sure exactly what I did wrong. Also, note the directory is different from the one in the exercise; this is just the way it appears in my text editor, I don't think it should change anything.
C:\Users\Trevin\odot>rspec spec\features\todo_lists\create_spec.rb
C:/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/configuratio
n.rb:1065:in load': cannot load such file -- C:/Users/Trevin/odot/spec/features
/todo_lists/create_spec.rb (LoadError)
from C:/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core
/configuration.rb:1065:in
block in load_spec_files'
from C:/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core
/configuration.rb:1065:in each'
from C:/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core
/configuration.rb:1065:in
load_spec_files'
from C:/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core
/command_line.rb:18:in run'
from C:/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core
/runner.rb:103:in
run'
from C:/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core
/runner.rb:17:in `block in autorun'
2 Answers
Seth Reece
32,867 PointsAre you using the Treehouse VM or Windows cmd? Either way I think you might still use forward slashes. I know you do for the VM since it runs a virtual Ubuntu server. Not 100% on Windows cmd, but if you notice the paths to your gems are using forward slashes. Only other thing would be if you file name or folder is spelled differently. (I'm far from an expert at using Ruby with Windows.)
Trevin Cole
377 PointsSOLVED. So I solved it by deleting the directory and file inside of it. I made sure that the file name and directory were the exact same as the tutorial and it worked like a charm. Thanks for the responses!
Trevin Cole
377 PointsIn addition, I edited a few mistakes in my code in the directory itself.
Rachelle Wood
15,362 PointsI am getting the same issue. I tried using back slashes only but I get virtually the same error message. Which file and directory did you erase?
Seth Reece
32,867 PointsSeth Reece
32,867 PointsHi Trevin,
Without specifics about your error this would be hard to answer.