美文网首页
运行项目Internal server error报错

运行项目Internal server error报错

作者: 落叶05 | 来源:发表于2020-01-19 12:01 被阅读0次

https://teamtreehouse.com/community/project-files-lead-to-missing-secretkeybase-for-development-environment-set-this-value-in-configsecretsyml

In case anyone else was wondering, the following solution helped me:

Create a secrets.yml file in your config directory.

In your terminal, type the following command: rake secret. This will generate a secret for you to include in your secrets.yml file.

Add the following snippet of code to your config/secrets.yml file:

development:
  secret_key_base: PASTE_YOUR_GENERATED_SECRET_HERE
(NOTE: WHEN TYPING THE ABOVE COMMAND, BE SURE TO ADD SPACES BEFORE "secret_key_base" AND NOT TABS, AS THIS WON'T WORK IN A YML FILE.)

Be sure to migrate your database: bin/rake db:migrate RAILS_ENV=development

Now when you boot up the server and render the application in the browser, you should be good to go.

相关文章

网友评论

      本文标题:运行项目Internal server error报错

      本文链接:https://www.haomeiwen.com/subject/botejftx.html