简体   繁体   中英

Trying to connect to server for ruby development

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.

在此处输入图片说明

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM