質問編集履歴
3
コードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -104,57 +104,37 @@
|
|
104
104
|
|
105
105
|
```ここに言語を入力
|
106
106
|
|
107
|
-
# SQLite. Versions 3.8.0 and up are supported.
|
108
|
-
|
109
|
-
# gem install sqlite3
|
110
|
-
|
111
|
-
#
|
112
|
-
|
113
|
-
# Ensure the SQLite 3 gem is defined in your Gemfile
|
114
|
-
|
115
|
-
# gem 'sqlite3'
|
116
|
-
|
117
|
-
#
|
118
|
-
|
119
107
|
default: &default
|
120
108
|
|
121
|
-
adapter: sql
|
109
|
+
adapter: mysql2
|
110
|
+
|
111
|
+
encoding: utf8
|
122
112
|
|
123
113
|
pool: 5
|
124
114
|
|
125
|
-
|
115
|
+
username: root
|
116
|
+
|
117
|
+
password:
|
118
|
+
|
119
|
+
host: localhost
|
120
|
+
|
121
|
+
|
126
122
|
|
127
123
|
|
128
124
|
|
129
125
|
development:
|
130
126
|
|
131
|
-
|
127
|
+
<<: *default
|
132
128
|
|
133
|
-
encoding: utf8
|
134
|
-
|
135
|
-
|
129
|
+
database: peer_development # DBの名前。「sample」の部分をアプリの名前に変更すると分かりやい
|
136
|
-
|
137
|
-
pool: 5
|
138
|
-
|
139
|
-
username: root
|
140
|
-
|
141
|
-
password:
|
142
|
-
|
143
|
-
host: localhost
|
144
130
|
|
145
131
|
|
146
|
-
|
147
|
-
# Warning: The database defined as "test" will be erased and
|
148
|
-
|
149
|
-
# re-generated from your development database when you run "rake".
|
150
|
-
|
151
|
-
# Do not set this db to the same as development or production.
|
152
132
|
|
153
133
|
test:
|
154
134
|
|
155
135
|
<<: *default
|
156
136
|
|
157
|
-
database:
|
137
|
+
database: peer_test # DBの名前。「sample」の部分をアプリの名前に変更すると分かりやい
|
158
138
|
|
159
139
|
|
160
140
|
|
@@ -162,11 +142,21 @@
|
|
162
142
|
|
163
143
|
<<: *default
|
164
144
|
|
165
|
-
database:
|
145
|
+
database: peer_production
|
146
|
+
|
147
|
+
username: peer_app
|
148
|
+
|
149
|
+
password: <%= ENV['PEER_DATABASE_PASSWORD'] %>
|
166
150
|
|
167
151
|
```
|
168
152
|
|
153
|
+
エラー文は
|
154
|
+
|
155
|
+
![イメージ説明](7c0a40544f952716c50e85e78c1978cb.jpeg)
|
156
|
+
|
157
|
+
|
158
|
+
|
169
|
-
これで
|
159
|
+
これです!!
|
170
160
|
|
171
161
|
|
172
162
|
|
2
コードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -42,7 +42,7 @@
|
|
42
42
|
|
43
43
|
### 該当コード
|
44
44
|
|
45
|
-
database.yml
|
45
|
+
変更前database.yml
|
46
46
|
|
47
47
|
```ここに言語を入力
|
48
48
|
|
@@ -100,6 +100,76 @@
|
|
100
100
|
|
101
101
|
|
102
102
|
|
103
|
+
変更後
|
104
|
+
|
105
|
+
```ここに言語を入力
|
106
|
+
|
107
|
+
# SQLite. Versions 3.8.0 and up are supported.
|
108
|
+
|
109
|
+
# gem install sqlite3
|
110
|
+
|
111
|
+
#
|
112
|
+
|
113
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
114
|
+
|
115
|
+
# gem 'sqlite3'
|
116
|
+
|
117
|
+
#
|
118
|
+
|
119
|
+
default: &default
|
120
|
+
|
121
|
+
adapter: sqlite3
|
122
|
+
|
123
|
+
pool: 5
|
124
|
+
|
125
|
+
timeout: 5000
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
development:
|
130
|
+
|
131
|
+
adapter: mysql2
|
132
|
+
|
133
|
+
encoding: utf8
|
134
|
+
|
135
|
+
database: peer
|
136
|
+
|
137
|
+
pool: 5
|
138
|
+
|
139
|
+
username: root
|
140
|
+
|
141
|
+
password:
|
142
|
+
|
143
|
+
host: localhost
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
# Warning: The database defined as "test" will be erased and
|
148
|
+
|
149
|
+
# re-generated from your development database when you run "rake".
|
150
|
+
|
151
|
+
# Do not set this db to the same as development or production.
|
152
|
+
|
153
|
+
test:
|
154
|
+
|
155
|
+
<<: *default
|
156
|
+
|
157
|
+
database: db/test.sqlite3
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
production:
|
162
|
+
|
163
|
+
<<: *default
|
164
|
+
|
165
|
+
database: db/production.sqlite3
|
166
|
+
|
167
|
+
```
|
168
|
+
|
169
|
+
これでも通りませんでした、、、、
|
170
|
+
|
171
|
+
|
172
|
+
|
103
173
|
### 補足情報(FW/ツールのバージョンなど)
|
104
174
|
|
105
175
|
|
1
コードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -40,6 +40,66 @@
|
|
40
40
|
|
41
41
|
|
42
42
|
|
43
|
+
### 該当コード
|
44
|
+
|
45
|
+
database.yml
|
46
|
+
|
47
|
+
```ここに言語を入力
|
48
|
+
|
49
|
+
# SQLite. Versions 3.8.0 and up are supported.
|
50
|
+
|
51
|
+
# gem install mysql2
|
52
|
+
|
53
|
+
#
|
54
|
+
|
55
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
56
|
+
|
57
|
+
# gem 'mysql2'
|
58
|
+
|
59
|
+
#
|
60
|
+
|
61
|
+
default: &default
|
62
|
+
|
63
|
+
adapter: mysql2
|
64
|
+
|
65
|
+
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
66
|
+
|
67
|
+
timeout: 5000
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
development:
|
72
|
+
|
73
|
+
<<: *default
|
74
|
+
|
75
|
+
database: db/development.mysql2
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
# Warning: The database defined as "test" will be erased and
|
80
|
+
|
81
|
+
# re-generated from your development database when you run "rake".
|
82
|
+
|
83
|
+
# Do not set this db to the same as development or production.
|
84
|
+
|
85
|
+
test:
|
86
|
+
|
87
|
+
<<: *default
|
88
|
+
|
89
|
+
database: db/test.mysql2
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
production:
|
94
|
+
|
95
|
+
<<: *default
|
96
|
+
|
97
|
+
database: db/production.mysql2
|
98
|
+
|
99
|
+
```
|
100
|
+
|
101
|
+
|
102
|
+
|
43
103
|
### 補足情報(FW/ツールのバージョンなど)
|
44
104
|
|
45
105
|
|