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 Generate a Scaffold

error when going to localhost/todo_lists

here is the error im getting for it

Started GET "/todo_lists" for ::1 at 2016-01-26 23:03:52 -0500
Processing by TodoListsController#index as HTML
TodoList Load (1.0ms) SELECT "todo_lists".* FROM "todo_lists"
Rendered todo_lists/index.html.erb within layouts/application (6.0ms)
Completed 500 Internal Server Error in 10113ms (ActiveRecord: 1.0ms)

ActionView::Template::Error (TypeError: Object doesn't support this property or method):
2: <html>
3: <head>
4: <title>Odot</title>
5: <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6: <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
7: <%= csrf_meta_tags %>
8: </head>
app/views/layouts/application.html.erb:5:in `app_views_layouts_application_html_erb__1897557456_70979700'

Rendered C:/Ruby21/lib/ruby/gems/2.1.0/gems/actionpack- (1.0ms)
Rendered C:/Ruby21/lib/ruby/gems/2.1.0/gems/actionpack- (97.0ms)
Rendered C:/Ruby21/lib/ruby/gems/2.1.0/gems/actionpack- (1.0ms)
Rendered C:/Ruby21/lib/ruby/gems/2.1.0/gems/actionpack- within rescues/layout (197.0ms )
Rendered C:/Ruby21/lib/ruby/gems/2.1.0/gems/web-console-2.2.1/lib/web_console/templates/_markup.html.erb (1.0ms)
Rendered C:/Ruby21/lib/ruby/gems/2.1.0/gems/web-console-2.2.1/lib/web_console/templates/_inner_console_markup.html.erb within layouts/inlined_string (1.0ms)
Rendered C:/Ruby21/lib/ruby/gems/2.1.0/gems/web-console-2.2.1/lib/web_console/templates/_prompt_box_markup.html.erb within layouts/inlined_string (0.0ms)
Rendered C:/Ruby21/lib/ruby/gems/2.1.0/gems/web-console-2.2.1/lib/web_console/templates/style.css.erb within layouts/inlined_string (1.0ms)
Rendered C:/Ruby21/lib/ruby/gems/2.1.0/gems/web-console-2.2.1/lib/web_console/templates/console.js.erb within layouts/javascript (153.0ms)
Rendered C:/Ruby21/lib/ruby/gems/2.1.0/gems/web-console-2.2.1/lib/web_console/templates/main.js.erb within layouts/javascript (1.0ms)
Rendered C:/Ruby21/lib/ruby/gems/2.1.0/gems/web-console-2.2.1/lib/web_console/templates/error_page.js.erb within layouts/javascript (1.0ms)
Rendered C:/Ruby21/lib/ruby/gems/2.1.0/gems/web-console-2.2.1/lib/web_console/templates/index.html.erb (336.0ms)

please really confused

4 Answers

Alan Matthews
Alan Matthews
10,161 Points

I found a similar problem on stack overflow. In your app/views/layouts/application.html.erb around line 5 or 6, change application to default

<%= stylesheet_link_tag    'default', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'default', 'data-turbolinks-track' => true %>

If that doesn't work, change your coffeescript gem in routes.rb to this:

gem 'coffee-script-source', '1.8.0'

and then bundle to install the gem.

Joel Buzzanco
Joel Buzzanco
Courses Plus Student 2,738 Points

Thanks for answering this, I was having a similar problem and changing 'application' to 'default ' fixed the bug. Awesome!

Thanks a lot it was able to help

Ivan Herazo
Ivan Herazo
4,263 Points

Thanks a lot!! The "default" move did the trick!!

Gaurav Mehla
Gaurav Mehla
3,131 Points

You are 'gem'. Thanks moving application to default worked.