Topic: cant find the table name

i create a new migration that looks like

class CreateNewTable < ActiveRecord::Migration
  def change
    create_table :new_table do |t|
      t.string :Test_field
      t.string :name
     
      t.timestamps
    end
  end
end

but when i go to rails c
and type NewTable i get this message

NameError: uninitialized constant NewTable


What should i do?

Re: cant find the table name

Just be sure to run the migration:

bundle exec rake:db:migrate

See more details on migrations at Rails guides

Re: cant find the table name

When i do

bundle exec rake db:migrate

it just goes to the next line

When i do

bundle exec rake:db:migrate

it tells me that
bundler: command not found: rake:db:migrate
Install missing gem executables with `bundle install`


i know that the table exist because there is data i just cant find it when i go in to rails c

Last edited by moiseszaragoza (2012-06-08 15:39:41)