Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails RubyonRails中的内部服务器错误_Ruby On Rails_Ruby On Rails 4_Internal Server Error - Fatal编程技术网

Ruby on rails RubyonRails中的内部服务器错误

Ruby on rails RubyonRails中的内部服务器错误,ruby-on-rails,ruby-on-rails-4,internal-server-error,Ruby On Rails,Ruby On Rails 4,Internal Server Error,我试图打开我的根页面,但显示错误“内部服务器错误” =>Rails 4.2.6应用程序在 =>运行rails服务器-h获取更多启动选项 =>Ctrl-C关闭服务器 瘦web服务器(v1.6.4代码名Gob Bluth) 最大连接数设置为1024 正在本地主机上侦听:4000,按CTRL+C停止 弃用警告:您没有设置密钥库。阅读升级文档以了解有关此新配置选项的更多信息。(从require at/home/smk/test/test/BMS New/bin/rails调用:9) 处理请求时出现意外错

我试图打开我的根页面,但显示错误“内部服务器错误”

=>Rails 4.2.6应用程序在
=>运行
rails服务器-h
获取更多启动选项
=>Ctrl-C关闭服务器
瘦web服务器(v1.6.4代码名Gob Bluth) 最大连接数设置为1024 正在本地主机上侦听:4000,按CTRL+C停止
弃用警告:您没有设置
密钥库
。阅读升级文档以了解有关此新配置选项的更多信息。(从require at/home/smk/test/test/BMS New/bin/rails调用:9) 处理请求时出现意外错误:缺少
secret\u令牌
secret\u密钥库
对于“开发”环境,请在
config/secrets.yml中设置这些值
/home/smk/test/test/BMS New/vendor/bundle/gems/railties-4.2.6/lib/rails/application.rb:534:in
validate\u secret\u key\u config!'
/home/smk/test/test/BMS New/vendor/bundle/gems/railties-4.2.6/lib/rails/application.rb:246:in
env_config' /home/smk/test/test/BMS New/vendor/bundle/gems/railties-4.2.6/lib/rails/engine.rb:514:in
call'
/home/smk/test/test/BMS New/vendor/bundle/gems/railties-4.2.6/lib/rails/application.rb:165:in
call' /home/smk/test/test/BMS New/vendor/bundle/gems/rack-1.6.4/lib/rack/content_length.rb:15:in
call'
/home/smk/test/test/BMS New/vendor/bundle/gems/thin-1.6.4/lib/thin/connection.rb:86:in
预处理中的块' /home/smk/test/test/BMS New/vendor/bundle/gems/thin-1.6.4/lib/thin/connection.rb:84:in
catch'
/home/smk/test/test/BMS New/vendor/bundle/gems/thin-1.6.4/lib/thin/connection.rb:84:in
pre_流程' /home/smk/test/test/BMS New/vendor/bundle/gems/thin-1.6.4/lib/thin/connection.rb:53:in
process'
/home/smk/test/test/BMS New/vendor/bundle/gems/thin-1.6.4/lib/thin/connection.rb:39:in
receive_data' /home/smk/test/test/BMS New/vendor/bundle/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:194:in
run\u machine'
/home/smk/test/test/BMS New/vendor/bundle/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:194:in
run' /home/smk/test/test/BMS New/vendor/bundle/gems/thin-1.6.4/lib/thin/backends/base.rb:73:in
start'
/home/smk/test/test/BMS New/vendor/bundle/gems/thin-1.6.4/lib/thin/server.rb:162:in
start' /home/smk/test/test/BMS New/vendor/bundle/gems/rack-1.6.4/lib/rack/handler/thin.rb:19:in
run'
/home/smk/test/test/BMS New/vendor/bundle/gems/rack-1.6.4/lib/rack/server.rb:286:in
start' /home/smk/test/test/BMS New/vendor/bundle/gems/railties-4.2.6/lib/rails/commands/server.rb:80:in
start'
/home/smk/test/test/BMS New/vendor/bundle/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:80:in
block in server' /home/smk/test/test/BMS New/vendor/bundle/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in
tap'
/home/smk/test/test/BMS New/vendor/bundle/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in
server' /home/smk/test/test/BMS New/vendor/bundle/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in
run_command!'
/home/smk/test/test/BMS New/vendor/bundle/gems/railties-4.2.6/lib/rails/commands.rb:17:in
' /home/smk/test/test/BMS New/bin/rails:9:in
require'
/home/smk/test/test/BMS New/bin/rails:9:in
' /home/smk/test/test/BMS New/vendor/bundle/gems/spring-1.7.1/lib/spring/client/rails.rb:28:in
load'
/home/smk/test/test/BMS New/vendor/bundle/gems/spring-1.7.1/lib/spring/client/rails.rb:28:in
call' /home/smk/test/test/BMS New/vendor/bundle/gems/spring-1.7.1/lib/spring/client/command.rb:7:in
call'
/home/smk/test/test/BMS New/vendor/bundle/gems/spring-1.7.1/lib/spring/client.rb:30:in
run' /home/smk/test/test/BMS New/vendor/bundle/gems/spring-1.7.1/bin/spring:49:in

/home/smk/test/test/BMS New/vendor/bundle/gems/spring-1.7.1/lib/spring/binstub.rb:11:in
load' /home/smk/test/test/BMS New/vendor/bundle/gems/spring-1.7.1/lib/spring/binstub.rb:11:in
'
/usr/local/lib/site\u ruby/2.3.0/rubygems/core\u ext/kernel\u require.rb:55:in
require' /usr/local/lib/site\u ruby/2.3.0/rubygems/core\u ext/kernel\u require.rb:55:in
require'
/home/smk/test/test/BMS New/bin/spring:13:in
箱子/轨道:3:in
load'

bin/rails:3:in
'

在您的
config/secrets.yml
文件中删除所有内容添加以下内容:

development:
  secret_key_base: bcbfd4e5010b035e62898f964188362877783b43f94bf883cf4b1d82d9224349789fb9dd0c2f33a200acfa266024a285e324caa3b20d0a9a352014156e47ec5c

test:
  secret_key_base: af068d8662bf954a2afeb27c64bbcdeb56b730029272bd3daff7e00c3c076999b3d2297747a3cef0550d3efd5cf8072e0477b8a62f096c94ab124f0d99320d20

# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
  secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
开发:
秘密密钥库:BCBFD4E5010B035E62898F9641883628877783B43F94BF883CF4B1D82D9224349789FB9DD0C2F33A200ACFA266024A285E324CAA3B20D0A9A32014156E47EC5C
测试:
密钥库:AF068D8662BF954A2AFEB27C64BBCDEB56B730029272BD3DAFF7E00C3C07699B3D2297747A3CEF00550D3EFD5CF8072E0477B8A62F0096C94AB124F0D99320D20
#不要在存储库中保留生产机密,
#而是从环境中读取值。
制作:
机密密钥库:
您的错误是指您的
secrets.yml
文件
secret\u key\u base
中缺少
secret\u令牌


供参考:您可以根据需要更改
密钥库
。如果没有此文件,请创建一个。对于不同的环境,
secret\u key\u base
将不同。您还应该在那里添加环境。在这里,我在您的
config/secrets.yml
文件中给出了
开发/生产/测试
环境

的密钥库删除所有内容添加以下内容:

development:
  secret_key_base: bcbfd4e5010b035e62898f964188362877783b43f94bf883cf4b1d82d9224349789fb9dd0c2f33a200acfa266024a285e324caa3b20d0a9a352014156e47ec5c

test:
  secret_key_base: af068d8662bf954a2afeb27c64bbcdeb56b730029272bd3daff7e00c3c076999b3d2297747a3cef0550d3efd5cf8072e0477b8a62f096c94ab124f0d99320d20

# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
  secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
开发:
秘密密钥库:BCBFD4E5010B035E62898F9641883628877783B43F94BF883CF4B1D82D9224349789FB9DD0C2F33A200ACFA266024A285E324CAA3B20D0A9A32014156E47EC5C
测试:
密钥库:AF068D8662BF954A2AFEB27C64BBCDEB56B730029272BD3DAFF7E00C3C07699B3D2297747A3CEF00550D3EFD5CF8072E0477B8A62F0096C94AB124F0D99320D20
#不要在存储库中保留生产机密,
#而是从环境中读取值。
制作:
机密密钥库:
你的错误是指