Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Write Our First Tests

Haris Beha
Haris Beha
557 Points

Action Controller: Exception Caught

I followed all of the directions in the video. I ran the first rspec test with success. I'm having issues with the section where we edit the todo_list.rb model. After running my test, I get two examples and two failures. When running the test in the browser, I get the following error. I am running Ubuntu 12+ x64 on a Digital Ocean VPS.

SyntaxError in TodoListsController#create
/var/www/html/prop/odot/app/models/todo_list.rb:5: syntax error, unexpected keyword_end, expecting end-of-input

Extracted source (around line #27):
25  # POST /todo_lists.json
26  def create
27    @todo_list = TodoList.new(todo_list_params)
28
29    respond_to do |format|
30      if @todo_list.save

Rails.root: /var/www/html/prop/odot
Alan Johnson
Alan Johnson
7,625 Points

It looks like there's a problem with your TodoList model. Can you share your code in todo_list.rb?

1 Answer

Haris Beha
Haris Beha
557 Points

Figured it out. Small typos can cause big issues! Thanks for your response!