I'm new to Rails and am going through their "getting started" tutorial on their website which leads you through making a blog. When I write a blog post it's saved to a database with @article.save. Anytime I go onto the website, I can see any of the past blog posts I have made so the data must be stored somewhere. I was wondering where specifically in the blog folder this is stored at.
1 Answer
The data is saved in sqllite3 database locally.
You can find this file in <app-folder/db/<env>.sqllite3.. For example, development.sqllite3
The database configuration is typically present <app-folder>/config/database.yml. file. By default, you will see below settings in it.
default: &default
adapter: sqlite3
pool: 5
timeout: 5000
development:
<<: *default
database: db/development.sqlite3
1 Comment
Anchor
Just to expand on this, I've found sqlite browser to be a useful tool for playing around with the database, for example if you need to modify certain records.