質問編集履歴
3
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -44,6 +44,130 @@
|
|
44
44
|
|
45
45
|
|
46
46
|
|
47
|
+
5/10
|
48
|
+
|
49
|
+
追記
|
50
|
+
|
51
|
+
以下、database.ymlの全文になります。
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
```ここに言語を入力
|
56
|
+
|
57
|
+
MySQL. Versions 5.1.10 and up are supported.
|
58
|
+
|
59
|
+
#
|
60
|
+
|
61
|
+
# Install the MySQL driver
|
62
|
+
|
63
|
+
# gem install mysql2
|
64
|
+
|
65
|
+
#
|
66
|
+
|
67
|
+
# Ensure the MySQL gem is defined in your Gemfile
|
68
|
+
|
69
|
+
# gem 'mysql2'
|
70
|
+
|
71
|
+
#
|
72
|
+
|
73
|
+
# And be sure to use new-style password hashing:
|
74
|
+
|
75
|
+
# https://dev.mysql.com/doc/refman/5.7/en/password-hashing.html
|
76
|
+
|
77
|
+
#
|
78
|
+
|
79
|
+
default: &default
|
80
|
+
|
81
|
+
adapter: mysql2
|
82
|
+
|
83
|
+
encoding: utf8
|
84
|
+
|
85
|
+
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
86
|
+
|
87
|
+
username: root
|
88
|
+
|
89
|
+
password:
|
90
|
+
|
91
|
+
socket: /tmp/mysql.sock
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
development:
|
96
|
+
|
97
|
+
<<: *default
|
98
|
+
|
99
|
+
database: portfolio_development
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
# Warning: The database defined as "test" will be erased and
|
104
|
+
|
105
|
+
# re-generated from your development database when you run "rake".
|
106
|
+
|
107
|
+
# Do not set this db to the same as development or production.
|
108
|
+
|
109
|
+
test:
|
110
|
+
|
111
|
+
<<: *default
|
112
|
+
|
113
|
+
database: portfolio_test
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
# As with config/secrets.yml, you never want to store sensitive information,
|
118
|
+
|
119
|
+
# like your database password, in your source code. If your source code is
|
120
|
+
|
121
|
+
# ever seen by anyone, they now have access to your database.
|
122
|
+
|
123
|
+
#
|
124
|
+
|
125
|
+
# Instead, provide the password as a unix environment variable when you boot
|
126
|
+
|
127
|
+
# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
|
128
|
+
|
129
|
+
# for a full rundown on how to provide these environment variables in a
|
130
|
+
|
131
|
+
# production deployment.
|
132
|
+
|
133
|
+
#
|
134
|
+
|
135
|
+
# On Heroku and other platform providers, you may have a full connection URL
|
136
|
+
|
137
|
+
# available as an environment variable. For example:
|
138
|
+
|
139
|
+
#
|
140
|
+
|
141
|
+
# DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase"
|
142
|
+
|
143
|
+
#
|
144
|
+
|
145
|
+
# You can use this database configuration with:
|
146
|
+
|
147
|
+
#
|
148
|
+
|
149
|
+
# production:
|
150
|
+
|
151
|
+
# url: <%= ENV['DATABASE_URL'] %>
|
152
|
+
|
153
|
+
#
|
154
|
+
|
155
|
+
production:
|
156
|
+
|
157
|
+
<<: *default
|
158
|
+
|
159
|
+
database: sample_production
|
160
|
+
|
161
|
+
username: sample
|
162
|
+
|
163
|
+
password: <%= ENV['SAMPLE_DATABASE_PASSWORD'] %>
|
164
|
+
|
165
|
+
socket: /var/lib/mysql/mysql.sock
|
166
|
+
|
167
|
+
```
|
168
|
+
|
169
|
+
|
170
|
+
|
47
171
|
### 補足情報(FW/ツールのバージョンなど)
|
48
172
|
|
49
173
|
Rails 5.2.4.2を使用しています。
|
2
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
socket: /var/lib/mysql/mysql.sock
|
32
32
|
|
33
|
-
|
33
|
+
```
|
34
34
|
|
35
35
|
5/8追記
|
36
36
|
|
@@ -41,8 +41,6 @@
|
|
41
41
|
gem install bundlerでbundlerをインストール
|
42
42
|
|
43
43
|
gem install railsでrailsをインストール(Verは開発時のものと合わせる)
|
44
|
-
|
45
|
-
```
|
46
44
|
|
47
45
|
|
48
46
|
|
1
追記記載
test
CHANGED
File without changes
|
test
CHANGED
@@ -30,6 +30,18 @@
|
|
30
30
|
|
31
31
|
socket: /var/lib/mysql/mysql.sock
|
32
32
|
|
33
|
+
|
34
|
+
|
35
|
+
5/8追記
|
36
|
+
|
37
|
+
MySQLをインストール後に起動確認
|
38
|
+
|
39
|
+
念のためにrbenvを再インストール(Verは開発時のものと合わせる)
|
40
|
+
|
41
|
+
gem install bundlerでbundlerをインストール
|
42
|
+
|
43
|
+
gem install railsでrailsをインストール(Verは開発時のものと合わせる)
|
44
|
+
|
33
45
|
```
|
34
46
|
|
35
47
|
|