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 trialPatrick O'Sullivan
2,766 Pointsbin/rake spec... stuck need to know what's going on..
I'm now stuck after using rake spec.. error details below. Also, why are there no teachers notes in the video for the newer versions of rails/rspec etc? It's quite frustrating to be learning this and trying to troubleshoot errors when you've only written 2 lines of code...
Any assistance is appreciated.
Patricks-MBP:odot posullivan$ bin/rake spec
/Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.0.2/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now
/Users/posullivan/.rbenv/versions/2.2.2/bin/ruby -S rspec ./spec/controllers/todo_lists_controller_spec.rb ./spec/helpers/todo_lists_helper_spec.rb ./spec/models/todo_list_spec.rb ./spec/requests/todo_lists_spec.rb ./spec/routing/todo_lists_routing_spec.rb ./spec/views/todo_lists/edit.html.erb_spec.rb ./spec/views/todo_lists/index.html.erb_spec.rb ./spec/views/todo_lists/new.html.erb_spec.rb ./spec/views/todo_lists/show.html.erb_spec.rb
/Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.0.2/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now
/Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in require': cannot load such file -- test/unit/assertions (LoadError)
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in
block in require'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in load_dependency'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in
require'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-rails-2.99.0/lib/rspec/rails/adapters.rb:17:in rescue in <module:Rails>'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-rails-2.99.0/lib/rspec/rails/adapters.rb:12:in
<module:Rails>'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-rails-2.99.0/lib/rspec/rails/adapters.rb:6:in <module:RSpec>'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-rails-2.99.0/lib/rspec/rails/adapters.rb:5:in
<top (required)>'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in require'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in
block in require'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in load_dependency'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in
require'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-rails-2.99.0/lib/rspec/rails.rb:11:in <top (required)>'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in
require'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in block in require'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in
load_dependency'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in require'
from /Users/posullivan/RubyOnRails/Projects/odot/spec/spec_helper.rb:4:in
<top (required)>'
from /Users/posullivan/RubyOnRails/Projects/odot/spec/controllers/todo_lists_controller_spec.rb:1:in require'
from /Users/posullivan/RubyOnRails/Projects/odot/spec/controllers/todo_lists_controller_spec.rb:1:in
<top (required)>'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in load'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in
block in load_spec_files'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in each'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in
load_spec_files'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:18:in run'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:103:in
run'
from /Users/posullivan/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:17:in `block in autorun'
/Users/posullivan/.rbenv/versions/2.2.2/bin/ruby -S rspec ./spec/controllers/todo_lists_controller_spec.rb ./spec/helpers/todo_lists_helper_spec.rb ./spec/models/todo_list_spec.rb ./spec/requests/todo_lists_spec.rb ./spec/routing/todo_lists_routing_spec.rb ./spec/views/todo_lists/edit.html.erb_spec.rb ./spec/views/todo_lists/index.html.erb_spec.rb ./spec/views/todo_lists/new.html.erb_spec.rb ./spec/views/todo_lists/show.html.erb_spec.rb failed
3 Answers
Justin Horner
Treehouse Guest TeacherHello Patrick,
It looks like you are using Ruby 2.2.2 for this project. I would recommend installing Ruby 2.0.0-p645 and using it for the project. You can use rbenv to do this.
Here is how to install another Ruby version with rbenv and here is how to set the local Ruby version for your project.
If you have any difficulty doing this please let me know. I'd be glad to help further.
I hope this helps.
Anthony Hernandez
7,365 PointsI'm just going to take a stab at this based on the first line of the output.
It looks like you ran "bin/rspec spec"; however, I believe what you need to run is "bin/rspec spec/features/todo_lists/create_spec.rb" in this case.
Patrick O'Sullivan
2,766 PointsSo far so good. I installed Ruby 2.0.0-p645 and set it to the global version. FYI for anyone else that has to do it. You have to rehash and reinstall rails as well once you do this.
Thanks for the help, Justin. I will post again if anything further comes up.
Justin Horner
Treehouse Guest TeacherYou're welcome!