質問編集履歴

3

タイトルを変更(開発環境のみでの問題であることを強調しました)しました。

2020/07/28 11:26

投稿

shuhei_rb
shuhei_rb

スコア0

test CHANGED
@@ -1 +1 @@
1
- Railsアプリのメール機能(アカウント有効化)のエラーが直せません
1
+ Railsアプリのメール機能(アカウント有効化)のエラーが直せません(開発環境のみ。本番環境では問題なし。)
test CHANGED
File without changes

2

きちんとアカウントの有効化はできていると思うということを追記しました。

2020/07/28 11:26

投稿

shuhei_rb
shuhei_rb

スコア0

test CHANGED
File without changes
test CHANGED
@@ -183,3 +183,5 @@
183
183
 
184
184
 
185
185
  ```
186
+
187
+ また、rails serverのログからアカウント有効化のurlを貼り付けるときちんと有効化されます。

1

config/environments/development.rbの内容を貼り付けました。

2020/07/28 11:22

投稿

shuhei_rb
shuhei_rb

スコア0

test CHANGED
File without changes
test CHANGED
@@ -42,4 +42,144 @@
42
42
 
43
43
 
44
44
 
45
- Errno::ECONNREFUSED (Connection refused - connect(2) for "localhost" port 25)で検索してみましたが、どれもconfig/environments/development.rbの設定をしていないという理由の物で、自分には該当しないと思っております。このようなメール送信後のページ取得に関して何か原因が分かる方がいらっしゃいましたらご協力お願いします。もちろん自分の見当違い可能性もございます。
45
+ Errno::ECONNREFUSED (Connection refused - connect(2) for "localhost" port 25)で検索してみましたが、どれもconfig/environments/development.rbの設定をしていないという理由の物で、自分には該当しないと思っております。このようなメール送信後のページ取得に関して何か原因が分かる方がいらっしゃいましたらご協力お願いします。本番環境(herokuでのデプロイ先)では上手く動いているため開発環境の設定がよくないのかしれませ自分のconfig/environments/development.rb内容は以下のようになっています。
46
+
47
+ ```
48
+
49
+ Rails.application.configure do
50
+
51
+ # Settings specified here will take precedence over those in config/application.rb.
52
+
53
+
54
+
55
+ # In the development environment your application's code is reloaded on
56
+
57
+ # every request. This slows down response time but is perfect for development
58
+
59
+ # since you don't have to restart the web server when you make code changes.
60
+
61
+ config.cache_classes = false
62
+
63
+
64
+
65
+ # Do not eager load code on boot.
66
+
67
+ config.eager_load = false
68
+
69
+
70
+
71
+ # Show full error reports.
72
+
73
+ config.consider_all_requests_local = true
74
+
75
+
76
+
77
+ # Enable/disable caching. By default caching is disabled.
78
+
79
+ # Run rails dev:cache to toggle caching.
80
+
81
+ if Rails.root.join('tmp', 'caching-dev.txt').exist?
82
+
83
+ config.action_controller.perform_caching = true
84
+
85
+ config.action_controller.enable_fragment_cache_logging = true
86
+
87
+
88
+
89
+ config.cache_store = :memory_store
90
+
91
+ config.public_file_server.headers = {
92
+
93
+ 'Cache-Control' => "public, max-age=#{2.days.to_i}"
94
+
95
+ }
96
+
97
+ else
98
+
99
+ config.action_controller.perform_caching = false
100
+
101
+
102
+
103
+ config.cache_store = :null_store
104
+
105
+ end
106
+
107
+
108
+
109
+ # Store uploaded files on the local file system (see config/storage.yml for options).
110
+
111
+ config.active_storage.service = :local
112
+
113
+
114
+
115
+ # Don't care if the mailer can't send.
116
+
117
+ config.action_mailer.raise_delivery_errors = false
118
+
119
+
120
+
121
+ host = '7dea0eb0d9574e62998253472a0a2fd4.vfs.cloud9.us-east-2.amazonaws.com'
122
+
123
+ config.action_mailer.default_url_options = { host: host, protocol: 'https' }
124
+
125
+
126
+
127
+ config.action_mailer.perform_caching = false
128
+
129
+
130
+
131
+ # Print deprecation notices to the Rails logger.
132
+
133
+ config.active_support.deprecation = :log
134
+
135
+
136
+
137
+ # Raise an error on page load if there are pending migrations.
138
+
139
+ config.active_record.migration_error = :page_load
140
+
141
+
142
+
143
+ # Highlight code that triggered database queries in logs.
144
+
145
+ config.active_record.verbose_query_logs = true
146
+
147
+
148
+
149
+ # Debug mode disables concatenation and preprocessing of assets.
150
+
151
+ # This option may cause significant delays in view rendering with a large
152
+
153
+ # number of complex assets.
154
+
155
+ config.assets.debug = true
156
+
157
+
158
+
159
+ # Suppress logger output for asset requests.
160
+
161
+ config.assets.quiet = true
162
+
163
+
164
+
165
+ # Raises error for missing translations.
166
+
167
+ # config.action_view.raise_on_missing_translations = true
168
+
169
+
170
+
171
+ # Use an evented file watcher to asynchronously detect changes in source code,
172
+
173
+ # routes, locales, etc. This feature depends on the listen gem.
174
+
175
+ config.file_watcher = ActiveSupport::EventedFileUpdateChecker
176
+
177
+ # Cloud9 への接続を許可する
178
+
179
+ config.hosts.clear
180
+
181
+ end
182
+
183
+
184
+
185
+ ```