T
T
Tokenchik2017-04-30 09:09:17
Ruby on Rails
Tokenchik, 2017-04-30 09:09:17

How to get to the database?

Newbie going through getstartered, familiar with yii2 before and I'm a bit stumped. I installed the RoR package, I am doing the migrations according to the tutorial. The server starts after rails server. I don't understand how the base works? If in yii2 I made a database in phpmyadmin, set connection parameters and worked with it, then here I see that records are added / deleted full crud, in general, everything works ok through ActiveRecord. I found a file where the records that I enter are stored. In the description for the installer, I see that there is sqlite, but maybe I don’t understand something, it turns out that the rails server command also raises the bases? Or is it just manipulations with a text file. I repeat - I go through getstartered. and I'm a little confused. Enlighten please.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Bogdan, 2017-04-30
@bogdan_uman

Well, as it were, the rails do not start the server for the database, but only connect, the settings that are made from the "config/database.yml" file. There is no server in SQlite, here is what the wiki says

that is, the SQLite engine is not a separate running process with which the program interacts, but provides a library with which the program is linked, and the engine becomes an integral part of the program.

A
Artur Bordenyuk, 2017-04-30
@HighQuality

Here you need to understand not Ruby / ROR, but how the SQLite database is arranged and works - in the same way it can work for yii2, if you configure the application correctly.
The sqlite database does not need to be raised, there are no demons on the server (although who knows ..).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question