Model contact.rb:
class Contact < ActiveRecord::Base
attr_accessible :name, :phone
end
Test.rb:
Contact.create({:name => "Josh", :phone => "123-456789"})
When I run test.rb from terminal I'm receiving the error:
lib/tasks/test.rb:1:in `': uninitialized constant Contact (NameError)
database.yml:
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
I believe this is a trivial question. I've searched this forum, but it didn't give any clue on this.
Let me know if I have to input additional information to make it clear.