0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

NoMethodError: undefined method `web_console'

Posted at

#現象
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://git@heroku.com/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が成功した

#参考
https://www.oiax.jp/books/rails4book/undefined_method_web_console.html

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?