Error ActiveRecord::StatementInvalid

You have not told us several vital facts.
1. Do you think there *should* be a table refinery_roles?
2. If the answer to 1 is Yes, then is there actually such a table in
the database?
3. If the answer to 1 is No, then you need to show us the code around
role.rb line 14 in order that we may help you to understand why it is
expecting such a table.


Yes I have the table in the database but I do not why it don´t found.
here my role.rb:

How do you know that the table refinery_roles is in the db? Post the
contents of db/schema.rb here.


my schema contents:

# encoding: UTF-8
ActiveRecord::Schema.define(:version => 20120717180765) do

First could you not top post please, it makes it difficult to follow
the thread. Thanks.
The above looks strange, suggesting that the db structure has not
changed since 2012, yet you told us you ran db:migrate. Is there
something you are not telling us? Is this an app that has worked and
for some reason it is no longer? Is it a new deploy? Is it just a
new bit of code that is not working but other stuff does? All
important info that helps to find the problem.

  create_table "refinery_roles", :force => true do |t|
    t.string "title"

So that says the table should exist.

You did not answer my question as to how you know the table exists.
Have you checked for it in the database using mysql command line or


I didn´t check the database because I can see in the file schema, but How
can I access to database??. The app doesn´t load and when I check the log
file, it returns me this:

You are still top posting, I would prefer if you did not. If you
don't know what I am talking about then google for
top posting

Are you using mysql or sqlite? If mysql then use the mysql command in
a terminal. I think there is a similar tool for sqlite. Google will
easily find you a tutorial on how to use it.

You still have not answered the other questions about the app. How is
it that the schema suggests that the db structure has not recently
been modified yet you said you had run db:migrate?


What don't you understand about not top posting? Any more top posted
messages will be binned by me. Also you have not quoted the relevant
sections of the previous email.

How is it that the last time the db structure was updated is 2012?


even if the table is missing,the server use to start, try to delete the model, check if the server start, if do it, begin to write the model, and restart the server after write a line, with that you can see what is crashing the server