H.P.L. wrote:
> rails todo -d mysql
> cd todo
> { mate | vim } config/database.yml
> rake db:create:all
> script/generate scaffold Todo title:string body:text done:boolean  
> due:datetime
> rake db:migrate
>
>   
You've created all three databases here (Prod,Dev,Test) but they are empty.

You've then populated the dev database with "rake db:migrate"
> I get the exact same effect (as I understand I am essentially doing  
> the same thing as script/server). But when I evoke mongrel_rails to  
> run as production:
> sudo mongrel_rails start -e production -p 8000 -a 127.0.0.1 -P tmp/ 
> pids/mongrel-1.pid
>
> Then I can pull up the public/index.html with no problem, but  
> navigating to http://example.com/todos I'll get the dreaded "We're  
> sorry, but something went wrong. (500)" page, and my log/ 
> production.log delivers:
>
> ActiveRecord::StatementInvalid (Mysql::Error: Table  
> 'todo_production.todos' doesn't exist: SELECT * FROM `todos` ):
>    app/controllers/todos_controller.rb:5:in `index'
>   
The table todos doesn't exist as it hasn't been created.

Anthony

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to