Generating a model with a SQLite3 database

Hi all,

I'm new to RubyMine, Ruby and Rails so bear with me.

I'm looking for a tutorial on how to generate my model in RubyMine from a SQLite3 database. I've created my SQLite3 database (2 tables). It seems like RubyMine can connect to it as it can display the 2 tables in the database pane on the right side of the RubyMine window.

But now, I would like to generate the model from this database. By generating, I mean populating two .rb file, each one with a class deriving from ActiveRecord. Is it possible to do so with RubyMine?

Or do I have to do this by myself? A tutorial on this topic, ignoring the exact type of database, would be appreciated for a beginner. Maybe how the whole thing connects together in the background would also be good. How do I configure my database.yml file? Do I have to add a line of code then in the rest of the application where I connect to the database? Or does all of this is done by magic when I load a database in the database pane on the right side of the RubyMine window?

Thank you,



Please sign in to leave a comment.