I am new to RoR, but not new to web development in general. I am trying to switch a Rails app from sqlite3 to mysql2, it is api-only. Added the gem to Gemfile, used bundle install, everything fine. I run rails server and see the error bellow: https://i.sstatic.net/wX4Gm.jpg
This is my Database.yml:
default: &default
adapter: mysql2
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
encoding: utf8
reconnect: true
host: 127.0.0.1
port: 3306
username: root
password: 123456
socket: /tmp/mysql.sock
development:
<<: *default
database: beginner_dev
test:
<<: *default
database: beginner_test
production:
<<: *default
database: beginner_prod
I succeeded to solve the problem by adding the following lines to database.yml, default section:
ssl_mode: :disabled
sslverify: false
The error isn't so descriptive, but apparently it was related to ssl.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With