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!

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


Will Vincent
Will Vincent
2,594 Points

rake db:migrate

When i type rake db:migrate it says rake aborted! uninitialized constant YoPage /Users/rubyonrails/YoPage/Rakefile:7:in `<top (required)>' (See full trace by running task with --trace)

1 Answer

Hi Will, welcome to Treehouse. The Rails framework operates based largely on convention rather than configuration. What I mean by this is that Rails uses strict naming conventions. For example, a class name like YoPage would be associated with the table yo_pages. Rails automatically "knows" and uses this convention. You can actually see these conventions by calling up the Rails console with rails c and typing "YoPage".pluralize. It returns, "YoPages". Models use a style called "snakecase. This looks like yo_pages. So, my suggestion would be to make sure that you're following the Rails naming convention in your migration, given your class YoPages. Hope that helps!