To solve your current task of creating a database diagram you can use the Rails gem suggested by rdnewman. Just follow the steps on the link below:
http://rails-erd.rubyforge.org/install.html
Answering your two other questions:
There's no problem in MySQL. The thing is that MySQL Workbench needs foreign keys to create the relationships between your tables. You could do that by yourself, for instance, setting your
user_id
attribute from the Post model as a foreign key from theposts
table. What Rails ERD does is that it loads your Active Record models and processes all their attributes and associations (has_one, has_many, belongs_to, etc.), combining it into a single diagram.In order to have this relationship shown in MySQL, you'll need to create foreign_keys on your models. However, the Rails default behaviour is that the column used to hold the foreign key on a model is the name of the association with the suffix _id added. The :foreign_key option lets you set the name of the foreign key directly.
You can find more info on this Association Basics Guide for Rails.