Ruby Build a Rails API Coding the API Creating To-Do Items

Ashley Putnam
Ashley Putnam
399 Points

Rails Server Stopped Working

Before the "Creating To-do Items" segment, my project was working perfectly. The VM was setup and I coud "rails s" and get things going. After I added the new code from this section, the rails server will not even boot. I get a this:

"Exiting /home/treehouse/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:241:in `load': /home/treehouse/projects/odot/config/routes.rb:26: syntax error, unexpected keyword_end, expecting end-of-input (SyntaxError)"

and a list of dependencies.

What should I do?

2 Answers

Daniel Cunningham
Daniel Cunningham
20,275 Points

Start by checking line 26 of Routes.rb and make sure that everything is correct with the syntax. Possibly post that if you want a few more sets of eyes on it as well. The error is "unexpected keyword_end, expecting end of input" which suggests that an "end" or perhaps a comma, close parenthesis or other syntax issue is causing the code to break.

Ashley Putnam
Ashley Putnam
399 Points

I left out a "do" early on in my routes.rb. All is working again. Thanks for your help.