1

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 1

3

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
Sign up to request clarification or add additional context in comments.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.