0
votes

(see title) here is the code, I'm using ms command prompt (irb) to do this, which may in itself be wrong.

C:\Users\davo\Desktop\RailsProjects\sqlite>irb

\<\lass CreateProducts < ActiveRecord::Migration

irb(main):002:1> def up

irb(main):003:2> create_table :products do |t|

irb(main):004:3* t.string :name

irb(main):005:3> t.text :description

irb(main):006:3> t.timestamps

irb(main):007:3> end

irb(main):008:2> end

irb(main):009:1> end

NameError: uninitialized constant ActiveRecord

   from (irb):1

   from C:/Ruby193/bin/irb:12:in `<main>'

irb(main):010:0>

I know that it's not supposed to be \<\lass but that's not what I typed and I think that's not the issue but I'm not sure.

1

1 Answers

1
votes

You need to require 'active_record'. I agree that you may run into other issues trying to migrate by hand.