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

rspec not running correctly?

I am having some troubles with running rspec. I have tried rebuilding the project a few times and making changes to the Gemfile, as this might have something to do with rspec 2.0 vs. rspec 3.0 (running it on my Mac - not virtual machine), but I seem to get stuck at this same step either way. Here is the code I run and the result:

$ bin/rspec spec/features/todo_lists/create_spec.rb

/Users/e/.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': /Users/e/Desktop/treehouse/odot/spec/features/todo_lists/create_spec.rb:8: syntax error, unexpected end-of-input, expecting keyword_end (SyntaxError) from /Users/e/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:inblock in load_spec_files' from /Users/e/.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/e/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:inload_spec_files' from /Users/e/.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/e/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:103:inrun' from /Users/e/.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'

I also got deprecation warnings when I ran rspec for the firs time. That is because I am using:

group :development, :test do gem 'rspec-rails', '~> 2.0' end

group :test do gem 'capybara', '~> 2.1.0' end

... rather than the most recent version of those gems, right? Will the app ultimately work if I ignore those warnings? If I use the most recent version of those gems, what other changes will I have to make along the way my app runs like the video's app?

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Please publish your project on github and link it here.

1 Answer

Hello,

From the error message it looks like you likely have at least one block of code that doesn't have an end statement associated with it. You might want to double check that every do has an end and every { has a }.