4
5

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 5 years have passed since last update.

herokuでThe page you were looking for doesn't exist.

Last updated at Posted at 2014-04-27

##追記
時間おいてもう一度プッシュしたら、なぜか普通にデプロイできるようになりました。

##もともとの内容

ついこないだまでなんともなかったのに、
新しくrailsアプリを作成してgit push heroku master してheroku側のページを表示したら、下記のようなメッセージのページがでるようになった。

#http://hogehoge.herokuapp.com/
The page you were looking for doesn't exist.
You may have mistyped the address or the page may have moved.
If you are the application owner check the logs for more information.

stackoverflowで
http://stackoverflow.com/questions/23180650/how-to-solve-error-missing-secret-key-base-for-production-environment-on-h

Add config/secrets.yml to version control and deploy again. You might need to remove a line from .gitignore so that you can commit the file.

I had this exact same issue and it just turned out the the boilerplate Github .gitignore included config/secrets.yml even tho rails new generates a file that is safe for version control.

いや、secrets.ymlに、secret_key_baseをリポジトリにいれんなって書いてあるやん。

secrets.yml
# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
  secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>

heroku側で SECRET_KEY_BASE を設定する必要があるということか。

開発環境側からherokuの環境変数を確認してみたけど、設定されてるぞ?

$ heroku config                                                                                                                       
=== herokunoappname Config Vars                                                                                                                                                    
DATABASE_URL:                 postgres://xxxxxxxxxxxxxxxxxxxxxxx                                    
HEROKU_POSTGRESQL_HOGE_URL: postgres://xxxxxxxxxxxxxxxxxxxxxxx                                     
LANG:                         en_US.UTF-8                                                                                                                                             
RACK_ENV:                     production                                                                                                                                              
RAILS_ENV:                    production                                                                                                                                              
SECRET_KEY_BASE:              xxxxxxxxxxxxxxxxxxxxxxx

他のページで同事象への対応として挙げられていた、アセットのプリコンパイルやDBのproduction環境でのmigrateも行っている。
よくわからん。

4
5
1

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
4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?