first i create the model on the pre-build table product ( i do not migrate product table it is already in the database) , after that i create the session migrate file , class Sessions < ActiveRecord::Migration def self.up create_table :sessions do |t| t.column :session_id, :string t.column :data, :text t.column :updated_at, :datetime end
add_index :sessions, :session_id add_index :sessions, :updated_at end
def self.down drop_table :sessions end end . but it gives me the error \NetBeansProjects\project1\db\migrate\002_sessions.rb:1: uninitialized constant ActiveRecord (NameError)
can any one tell me what is the problem