Ruby Ruby on Rails 5 Basics Creating an App Our First Resource

Where is the database?

If i want to get all the table data details then from where i can get that. Where is the date? And which database rails uses?

1 Answer

Steve Hunter
MOD
Steve Hunter
Treehouse Moderator 56,149 Points

Hi there,

If you access the irb console you can query the database directly and look through its structure. The structure is also defined in schema.rb within the db folder in your Rails app.

Rails usually deploys to PostgreSQL but in development it could mysql3 or whatever you have set in your Gemfile.

I hope that helps,

Steve.