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

Problem with generating a scaffold for odot application

So I'm on the the 'generate a scaffold video and I'm following along at migrating the database at 2:50.

when I followed along with the command and did 'rake db:migrate' I get an error (I didn't include the bin before rake as It doesn't rocognize bis as a command for me, just for the sake of being thorough I did include the command with bin and didn't work)

For the error first it says

createtodolists: migrating create_table(:todo_lists)

just like the video says. THen it says

rake aborted! StandardError: An error has occurred, this and all later migrations canceled:

privare method 'test' called for(then it says some stuff about active record, the db migrate and the locations for createing the todo lists ) then it says 'block in change'

then it gives the location of the 'creating a todo list' command again and says 'change'

and then it says

C: in 'migrate' tasks: TOP => db:migrate (See full trace by running task with --trace)

I really have no clue how to fix it. Any and all help appreciated. Thank you in advance.

P.S I used bitnami to set up an all in one ruby environment so could it be that in the case of the ruby environment that bitnami set up that I don't need to migrate the database?

1 Answer

Do you have the command that you ran? and also the exact error message (yeah, all that text) will likely be helpful.