Getting tables to work is RadRails?

88 views Asked by At

When I manually enter tables into the .rb file in the migrate folder nothing shows up. I have followed a few different "how to's" but I can't get the tables to show up when I preview my work. I can however get one table to show up if I create it in the parameters when generating a scaffold, but that's one table. I have Rails version 2.3.4 and version 1.2.3 installed on my lame Windows Vista. I have tried using both versions multiple times. I am also trying to follow the Ruby on Rails for Dummies book, but it seems a little outdated. Any tips on getting tables to work? Its supposed to be really simple and take "just minutes" to complete this simple app. Maybe something didn't install right? Maybe a better book?

1

There are 1 answers

0
bensie On

Just want to make sure you're using all the tools available to you:

To generate a migration file:

./script/generate MigrationFileName

Take a look at the Database Migrations Guide from the official Rails Guides for the correct syntax and options for creating a migration file.

Once you've created your migration, you need to run the following:

rake db:migrate

This will populate the database with the information specified in the migration file.