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 Simple Ruby on Rails Application Getting Started with Rails Generate a Rails Application

Files and content missing when trying to create application in virtual environment

I'm following the video and have followed the instructions but my files do not match the ones in the video.

I'm using the Treehouse virtual machine started by running Vagrant on my machine.

In my status.rb file, the following line did not appear, as it did at 2:42 in the video:

attr_accessible :content, :name

Mine just looked like this:

class Status < ActiveRecord::Base
end

Also, I am missing the timestamp_create_statuses.rb file as per 2:50 in the video, in the db/migrate folder.

Could somebody advise where I'm going wrong? Thanks!

2 Answers

Brandon Barrette
Brandon Barrette
20,485 Points

So those videos are written for Rails 3.2 and you most likely have Rails 4.1 installed. This is going to be a problem because of some major changes between Rails 3 and Rails 4.

I recommend stopping these videos and move to the videos for the ODOT application (starting here):

http://teamtreehouse.com/library/build-a-todo-list-application-with-rails-4

Followed by:

http://teamtreehouse.com/library/user-authentication-with-rails

Then there are about 6 more courses/projects to update the ODOT application and make it more functional. Once you finish those videos, you will have a better understanding of rails and then I would recommend going back to the Treebook application videos.

Hi Brandon

Thanks for that. Looks like I will have to shelve this project then but I've already done the ODOT application and to be honest, it went way, way over my head! I didn't understand what I was doing and why, just blindly following along. It was too advanced for me and this one seemed to be aimed at newbies so thought it might be more up my street.

Thanks though!

Brandon Barrette
Brandon Barrette
20,485 Points

Then I recommend this tutorial:

https://www.railstutorial.org/book

Go through it, try to tweak and change things to see how they respond. I found this book useful in understanding rails a bit more.

I also recommend trying to build your own application. maybe a blogging application with blogs, comments, and a user authentication system. That is truly the best way to learn. Try and fail a lot, but learn from your failings.

Thanks for that, Brandon! I will check it out.

I can't reply directly to your message unfortunately.