質問編集履歴
4
development環境でメール確認のためのgemの記載を追加しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -44,7 +44,9 @@
|
|
44
44
|
|
45
45
|
**ローカル環境**
|
46
46
|
|
47
|
-
macOS: Mojave10.14.6
|
47
|
+
- macOS: Mojave10.14.6
|
48
|
+
|
49
|
+
- メール確認gem:`letter_opener_web (1.3.4)`
|
48
50
|
|
49
51
|
|
50
52
|
|
3
local環境のos、config/environments/production.rbのコードを追記しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -42,6 +42,12 @@
|
|
42
42
|
|
43
43
|
|
44
44
|
|
45
|
+
**ローカル環境**
|
46
|
+
|
47
|
+
macOS: Mojave10.14.6
|
48
|
+
|
49
|
+
|
50
|
+
|
45
51
|
**認証関連gem**
|
46
52
|
|
47
53
|
- omniauth (1.9.0)
|
@@ -70,7 +76,7 @@
|
|
70
76
|
|
71
77
|
|
72
78
|
|
73
|
-
**(1/
|
79
|
+
**(1/4)db/schema.rb**
|
74
80
|
|
75
81
|
```ruby
|
76
82
|
|
@@ -132,7 +138,7 @@
|
|
132
138
|
|
133
139
|
|
134
140
|
|
135
|
-
**(2/
|
141
|
+
**(2/4)app/models/user.rb**
|
136
142
|
|
137
143
|
```ruby
|
138
144
|
|
@@ -194,7 +200,7 @@
|
|
194
200
|
|
195
201
|
|
196
202
|
|
197
|
-
**(3/
|
203
|
+
**(3/4)app/controllers/public/settings/users/omniauth_callbacks_controller.rb**
|
198
204
|
|
199
205
|
```ruby
|
200
206
|
|
@@ -260,6 +266,66 @@
|
|
260
266
|
|
261
267
|
end
|
262
268
|
|
263
|
-
|
264
|
-
|
265
269
|
```
|
270
|
+
|
271
|
+
**(4/4)config/environments/production.rb**
|
272
|
+
|
273
|
+
```ruby
|
274
|
+
|
275
|
+
Rails.application.configure do
|
276
|
+
|
277
|
+
config.cache_classes = true
|
278
|
+
|
279
|
+
config.eager_load = true
|
280
|
+
|
281
|
+
config.consider_all_requests_local = false
|
282
|
+
|
283
|
+
config.action_controller.perform_caching = true
|
284
|
+
|
285
|
+
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
286
|
+
|
287
|
+
config.assets.js_compressor = :uglifier
|
288
|
+
|
289
|
+
config.assets.compile = false
|
290
|
+
|
291
|
+
config.assets.digest = true
|
292
|
+
|
293
|
+
config.log_level = :debug
|
294
|
+
|
295
|
+
config.action_mailer.raise_delivery_errors = true
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
config.action_mailer.delivery_method = :smtp
|
300
|
+
|
301
|
+
config.action_mailer.smtp_settings = {
|
302
|
+
|
303
|
+
address: 'smtp.gmail.com',
|
304
|
+
|
305
|
+
port: 587,
|
306
|
+
|
307
|
+
domain: 'gmail.com',
|
308
|
+
|
309
|
+
user_name: 'toshihiro.no.ecsite@gmail.com',
|
310
|
+
|
311
|
+
password: ENV['gmail_password'],
|
312
|
+
|
313
|
+
authentication: 'plain',
|
314
|
+
|
315
|
+
enable_starttls_auto: true
|
316
|
+
|
317
|
+
}
|
318
|
+
|
319
|
+
config.i18n.fallbacks = true
|
320
|
+
|
321
|
+
config.active_support.deprecation = :notify
|
322
|
+
|
323
|
+
config.log_formatter = ::Logger::Formatter.new
|
324
|
+
|
325
|
+
config.active_record.dump_schema_after_migration = false
|
326
|
+
|
327
|
+
end
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
```
|
2
skip_confirmation!をコメントアウトしました
test
CHANGED
File without changes
|
test
CHANGED
@@ -240,7 +240,7 @@
|
|
240
240
|
|
241
241
|
@user = User.find_for_oauth(request.env['omniauth.auth'])
|
242
242
|
|
243
|
-
@user.skip_confirmation!
|
243
|
+
# @user.skip_confirmation!
|
244
244
|
|
245
245
|
if @user.persisted?
|
246
246
|
|
1
不要部分を削除しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -68,18 +68,6 @@
|
|
68
68
|
|
69
69
|
### 該当しそうなコード
|
70
70
|
|
71
|
-
【前提条件】
|
72
|
-
|
73
|
-
下記の語句は置き換えてあります
|
74
|
-
|
75
|
-
- Railsのアプリ名: 【webapp】
|
76
|
-
|
77
|
-
- 取得済みのドメイン: 【myDomain】
|
78
|
-
|
79
|
-
- 自分のグローバルIP: 【my_global_ip】
|
80
|
-
|
81
|
-
|
82
|
-
|
83
71
|
|
84
72
|
|
85
73
|
**(1/3)db/schema.rb**
|