Database connect
Hello and a wonderful day at all.
I'm a new RVM, Ruby and Rails user and I have a problem.
My problem is:
I can't connect my App to a database.
My System:
- OS: Rocky Linux on a Hypervisor VM
- Version: "9.2 (Blue Onyx)"
- Updates: all installed
My settings for a single based environment installation are:
- A separated user with sudo rights
- RVM Version: rvm 1.29.12 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
- Ruby Version: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
- Rails Version: Rails 7.1.1
I have installed mysql with this command:
sudo dnf install -y mysql-8.0.32-1.el9_2.x86_64
Database Server:
- A Synology NAS with mariaDB 10
The connection test via the mysql command is successful. I used this command:
mysql --host=nas.my.domain.com -P 3307 --database=dbMyDB --user=Username --password
My Problem is this:
I create a new project with this the following command:
ruby new test-db --database
In many articles I can read this is enough, for an application with a database connection, that isn't right. I can't see any file or directory how I can be setting up the database connection. I think it is not a right file and folder structure.
My content of the App is:
.gitattributes
.gitignore
.ruby-version
Gemfile
README.md
Rakefile
config.ru
Can anyone help me?