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 trialNolan Dalton
1,589 PointsRpsec + Syntax Issue
Getting this load error and a syntax one, not sure what I'm doing wrong:
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.3.1/lib/rspec/core/configuration.rb:1327:in load': C:/Sites/odot/spec/features/todo_lists/create_spec.rb:33: syntax error, unexpected keyword_end, expecting end-of-input (SyntaxError) from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.3.1/lib/rspec/core/configuration.rb:1327:in
block in load_spec_files' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.3.1/lib/rspec/core/configuration.rb:1325:in each' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.3.1/lib/rspec/core/configuration.rb:1325:in
load_spec_files' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.3.1/lib/rspec/core/runner.rb:102:in setup' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.3.1/lib/rspec/core/runner.rb:88:in
run' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.3.1/lib/rspec/core/runner.rb:73:in run' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.3.1/lib/rspec/core/runner.rb:41:in
invoke' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.3.1/exe/rspec:4:in <top (required)>' from C:/RailsInstaller/Ruby2.1.0/bin/rspec:23:in
load' from C:/RailsInstaller/Ruby2.1.0/bin/rspec:23:in `<main>'
2 Answers
Scott Wilcox
9,517 PointsC:/Sites/odot/spec/features/todo_lists/create_spec.rb:33: syntax error, unexpected keyword_end, expecting end-of-input (SyntaxError)
You are missing an 'END' somewhere in the create_spec.rb around or after line 33.
Scott Wilcox
9,517 PointsThe reason for the load error is the syntex error. When you fix the syntex error it will then load or give you a new error to chase down. The first issue is that there is an 'END' missing.
This:
C:/Sites/odot/spec/features/todo_lists/create_spec.rb:33: syntax error, unexpected keyword_end, expecting end-of-input (SyntaxError)
Is the cause for this:
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.3.1/lib/rspec/core/configuration.rb:1327:in load':
Nolan Dalton
1,589 PointsFixed the end but now getting one with the helper on line 1
C:/RailsInstaller/Ruby2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in require': cannot load such file -- rails_helper (LoadError) from C:/RailsInstaller/Ruby2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in
require' from C:/Sites/odot/spec/features/todo_lists/create_spec.rb:1:in <top (required)>' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.3.1/lib/rspec/core/configuration.rb:1327:in
load' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.3.1/lib/rspec/core/configuration.rb:1327:in block in load_spec_files' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.3.1/lib/rspec/core/configuration.rb:1325:in
each' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.3.1/lib/rspec/core/configuration.rb:1325:in load_spec_files' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.3.1/lib/rspec/core/runner.rb:102:in
setup' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.3.1/lib/rspec/core/runner.rb:88:in run' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.3.1/lib/rspec/core/runner.rb:73:in
run' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.3.1/lib/rspec/core/runner.rb:41:in invoke' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rspec-core-3.3.1/exe/rspec:4:in
<top (required)>' from C:/RailsInstaller/Ruby2.1.0/bin/rspec:23:in load' from C:/RailsInstaller/Ruby2.1.0/bin/rspec:23:in
<main>'
Code is on the GitHub repo I linked
Nolan Dalton
1,589 PointsNolan Dalton
1,589 PointsWhat about the load error?