Ruby on Rails Wednesday, January 27, 2016

On 27 January 2016 at 14:28, Benyamin Pm <lists@ruby-forum.com> wrote:
> Colin Law wrote in post #1180957:
>> On 27 January 2016 at 13:32, Benyamin Pm <lists@ruby-forum.com> wrote:
>>>
>>> text, "created_at" timestamp)
>> The error indicates that the migration calls for the creation of the
>> books table, but that table already exists.
>>
>> Colin
>
>
>
> but i don't create any table called 'books' for second time!
>
> can u take a look at the models in turorial?
> i see some mistakes in steps. maybe it have a problem in codes or
> somthing

Examine the database using whatever utility you use for doing that ( I
think it is psql for postgres, I guess there are also graphical
utilities) and I suspect you will find you have. Perhaps you have
accidentally added two migrations for adding the table, or perhaps you
have managed to run the migration twice. If you have nothing of
interest in the db than you can throw it away and start again using

rake db:drop # delete the db
rake db:create # create an empty one
rake db:migrate # run the migrations

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLv-oFopojRZ7SucRfGXTJBPfP9PZhOaKDWKKrt3GARWig%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment