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 Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Write Our First Tests

janeporter
PLUS
janeporter
Courses Plus Student 23,471 Points

getting a load error with this command: rspec spec/features/todo_lists/create_spec.rb in Windows 10 Pro

from this command line (in Windows 10) C:\Users\jporter\Documents\ruby_projects_tth\odot\bin> I try to run the following command: rspec spec/features/todo_lists/create_spec.rb

and get the following errors

C:/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in load': cannot load such file -- C:/Users/jporter/Documents/ruby_projects_tth/odot/bin/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:inblock 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:inload_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:inrun' 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'

what would I need to do to fix this?

1 Answer

Seth Kroger
Seth Kroger
56,413 Points

"spec/features/todo_lists/create_spec.rb" specifies the file relative to the current directory. If you were in odot, it would works because the spec directory in there, but inside odot/bin there isn't a spec directory. Try changing directory up one to odot and try the command again (using "bin/rspec" or "bundle exec rspec").