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

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!