How should I go about loading (or updating) a database for my RoR application? This is a “one time” operation, so coding it in the application seems strange.
Also, how do I access the database after the application is running, do the models files sit somewhere on my server, accesible for “read-only”?
Thanks.
You essentially can write a script to load data into the database from CSV files.
The following is an example how you can do that:
Then run the script using rails command line tool runner:
rails runner db/scripts/csv_data_loader.rb.