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 trialDavid Langley
10,965 PointsRuby off the rails......
Working through the "Updating the index page" I have updated the index.html text as described by Jim Hoskins . However when I reload i get an error page in the browser that states;
"NoMethodError in Statuses#index"
And it then displays the line <% Jay Welker Statuses.each do |status|%> Hello <% end %>
looks to have a problem with the .each method....
I also have an issue with the page displaying the same as Jim. All the html looks to have updated correctly however I don't think the Bootstrap style sheet is applying to the page. I checked and Bootstrap.css is in the app-assets-stylesheets folder.
Any ideas on the above would be appreciated, I'm a little stuck.
3 Answers
Maciej Czuchnowski
36,441 PointsAs for Bootstrap - did you download the latest version? The video has an older version and not all things that Jim uses in the video are present in the latest version of Bootstrap. You should either fetch an old version that the video uses or use the new version and look for your own preferred styles in its documentation and apply them instead of styles used by Jim.
Brandon Barrette
20,485 PointsIs @statuses defined in the controller? In statuses_controller.rb, under the index action, is @statuses = Status.all there?
David Langley
10,965 PointsHI Brandon,
Thanks for trying to help this is driving me a little crazy ! I just checked my statuses_controller and the code reads;
# GET /statuses # GET /statuses.json def index @statuses = Status.all end
any further thoughts ?
thanks again.
David Langley
10,965 PointsSorry Jay Welker I have no idea why this question just referenced you ! however if you know the answer ....
It should say ;
<% @Statuses.each do |status| %>
thanks
Maciej Czuchnowski
36,441 PointsShouldn't "Statuses" be written with a lower case letter? Like this: "statuses".
David Langley
10,965 PointsDavid Langley
10,965 PointsHi Maciej I did download the latest version of bootstrap and it appeared to download correctly.