Reputation: 11
I'm new to ruby and having trouble setting up my server.
I did all the gems installing and stuff have a mysql2
server running but I can't connect to it trough my local host keep getting a error.
So I've tried changing the default server gem
that is puma don't even know what that is to webrick
which was recommended and my active record database to mysql2 I get this a error
I'll upload my server client connections and gemfile and such if it is helpful.
But what I'm basically trying to do is setting up a server to test my ruby apps.
Upvotes: 0
Views: 63
Reputation: 61
You should check your database.yml and enters your connection parameters to your database.
Should appears something like this:
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: tst_database
pool: 5
username: root
password: "my_password_on_sql_installation"
#socket: /var/run/mysqld/mysqld.sock
After that run your server searching your route and typing rails server
on promt.
Upvotes: 1