「入力されたURLが適切ではありません。GistのURLを投稿して下さい。」問題
Opened this issue · 8 comments
yuuki commented
突然言われるようになった.
ローカルでは問題なく,Heroku上のみ再現できた.
デバッグコード一行入れただけで直ったけどよくわからない感じになっててあかん
rhysd commented
デバッグコードの部分の diff プリーズ.
rhysd commented
とりあえず,修正のためのブランチつくるか
yuuki commented
diff --git a/app/controllers/answers_controller.rb b/app/controllers/answers_controller.rb
index 7e1f105..05e5d8e 100644
--- a/app/controllers/answers_controller.rb
+++ b/app/controllers/answers_controller.rb
@@ -54,6 +54,7 @@ class AnswersController < ApplicationController
rescue
return nil
end
+ Rails.logger.warn content.inspect # 本番環境でこれがないとなぜか動かない
return nil if (content.status == "404" || content.status == "302") || gist_url?(url) == false
hash_from_gist(content)
end
yuuki commented
よろ
rhysd commented
とりあえずブランチ切ったけど,issue の番号おかしかった(真顔)
https://github.com/rhysd/daily_coding/branches/debug-issue8
yuuki commented
これやから(
rhysd commented
8 は open issues の数だった(テヘペロ
rhysd commented
確かにローカルだと再現しないなぁ.
とりあえずデバッグコード入れて様子見てみてダメそうなら対処するとかにするか…