Answer the question
In order to leave comments, you need to log in
Ruby and Rails how to connect mysql?
Hey guys.
I can't make friends with ROR and mysql
Created a new project
rails new project -d mysql
added
gem 'mysql2'
to gemfile
Made
gem mysql2 insatll
Corrected database.yml
default: &default
adapter: mysql2
database: ruby
username: ruby
password: 12345
host: localhost
encoding: utf8
socket: /var/lib/mysql/mysql.sock
development:
<<: *default
test:
<<: *default
production:
<<: *default
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question