NoMethodError: undefined method `web_console'
現象
railstutorial2章、Microposts作成時
herokuにpushしようとしたところ(git push heroku master)エラーが発生した。
【エラー内容】
To ssh://heroku.com/pure-shelf-xxxxx.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'ssh://[email protected]/pure-shelf-xxxxx.git'
ログを見ると下記のエラーが発生していた。
NoMethodError: undefined method `web_console'
原因
このエラーは、Gemパッケージweb_consoleに関する設定を config/application.rb ファイルや config/initializers ディレクトリ内のファイルなどに記述すると発生します。
→ config.web_console.whitelisted_ips = ''
どこかでwebconsoleの設定をしてしまっていた
解決方法
config/application.rbから
config.web_console.whitelisted_ips = ''
の記述を削除
結果
git push heroku master再実行→pushが成功した
参考
Author And Source
この問題について(NoMethodError: undefined method `web_console'), 我々は、より多くの情報をここで見つけました https://qiita.com/mozzarella-841/items/a8fdfc0bd9d56237c566著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .