ActiveRecord::StatementInvalid: ActiveRecord::StatementInvalid
from
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_recor
d/connection_adapters/sqlite_adapter.rb:259:in `table_structure'
from
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_suppo
rt/core_ext/object/misc.rb:23:in `returning'
from
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_recor
d/connection_adapters/sqlite_adapter.rb:258:in `table_structure'
from
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_recor
d/connection_adapters/sqlite_adapter.rb:196:in `columns'
from
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_recor
d/base.rb:696:in `columns'
from
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_recor
d/base.rb:1969:in `attributes_from_column_definition'
from
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_recor
d/base.rb:1351:in `initialize_without_callbacks'
from
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_recor
d/callbacks.rb:236:in `initialize'
from (irb):1:in `new'
from (irb):1
Active Record::Statement Invalid
Been stuck with this for the past 1 week.
Would be really happy if anybody could help me solve this problem
You did not migrate, so did you even create a table Recipe in the
database?
What does your table structure look like? You can fire up sqlite and
dump the table structure
sqlite db/dev.db
.dump
That should print out what your tables look like. It could be table
name and your model names are not matching (Rails magically assumes
pluralized table names, but the model names are singular, etc.), or you
might not even have a Recipe table in your db.
Another question. Are you spelling Recipe or Receipe?! In the above
posts, I see Receipe but should be Recipe.