Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/72.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 预期(200)<=&燃气轮机;Heroku控制台中的实际(401未经授权)_Ruby On Rails_Ssl_Heroku_Heroku Toolbelt - Fatal编程技术网

Ruby on rails 预期(200)<=&燃气轮机;Heroku控制台中的实际(401未经授权)

Ruby on rails 预期(200)<=&燃气轮机;Heroku控制台中的实际(401未经授权),ruby-on-rails,ssl,heroku,heroku-toolbelt,Ruby On Rails,Ssl,Heroku,Heroku Toolbelt,这才刚刚开始。每当我在我的生产应用程序中打开控制台(通过Heroku CLI),我都会收到此消息 Connecting to database specified by DATABASE_URL Expected(200) <=> Actual(401 Unauthorized) request => {:connect_timeout=>60, :headers=>{"Accept"=>"application/json", "Accept-Encod

这才刚刚开始。每当我在我的生产应用程序中打开控制台(通过Heroku CLI),我都会收到此消息

Connecting to database specified by DATABASE_URL

Expected(200) <=> Actual(401 Unauthorized)
  request => {:connect_timeout=>60, :headers=>{"Accept"=>"application/json", "Accept-Encoding"=>"gzip", "Authorization"=>"Basic OmQ5NDc0NTY0LWUwMDMtNDRlYy1hYTJjLTUxODYwMTI5YzA5Zg==", "User-Agent"=>"heroku-rb/0.2.1", "X-Heroku-API-Version"=>"3", "X-Ruby-Version"=>"2.0.0", "X-Ruby-Platform"=>"x86_64-linux", "Host"=>"api.heroku.com:443"}, :instrumentor_name=>"excon", :mock=>false, :read_timeout=>60, :retry_limit=>4, :ssl_ca_file=>"/app/vendor/bundle/ruby/2.0.0/gems/excon-0.13.4/data/cacert.pem", :ssl_verify_peer=>true, :write_timeout=>60, :host=>"api.heroku.com", :path=>"/apps/staging-xxxx/ps", :port=>"443", :query=>nil, :scheme=>"https", :expects=>200, :method=>:get}
  response => #<Excon::Response:0x007f2ecf385658 @body="{\"id\":\"unauthorized\",\"error\":\"Invalid credentials provided.\"}", @headers={"Cache-Control"=>"no-transform", "Content-Type"=>"application/json", "Date"=>"Tue, 28 Apr 2015 18:40:19 GMT", "Request-Id"=>"53c8af5d-0d1c-46bf-8779-e5f6d6c8cd1a", "Server"=>"nginx/1.4.6 (Ubuntu)", "Status"=>"401 Unauthorized", "X-Content-Type-Options"=>"nosniff", "X-Runtime"=>"0.015607713", "Content-Length"=>"61", "Connection"=>"keep-alive"}, @status=401>
Expected(200) <=> Actual(401 Unauthorized)
连接到数据库\u URL指定的数据库
预期(200)实际(401)
请求=>{:连接超时=>60,:头文件=>{“接受”=>“应用程序/json”,“接受编码”=>“gzip”,“授权”=>“基本OMQ5NDC0NTY0LWUWMTDNdryly1HYTJJLTUXODYWMTI5YZA5ZG=”,“用户代理”=>“heroku rb/0.2.1”,“X-heroku-API-Version”=>“3”,“X-Ruby-Version”=>“2.0.0”,“X-Ruby-Platform”=>“x86\U 64-linux”,“主机”=>“API.heroku.com:443”},:instrumentor\u name=>“excon”,:mock=>false,:read\u timeout=>60,:retry\u limit=>4,:ssl\u ca\u file=>“/app/vendor/bundle/ruby/2.0.0.0/gems/excon-0.13.4/data/cacert.pem”,:ssl\u verify\u peer=>true,:write\u timeout=>60,:host=>“api.heroku.com”,:path=>“/apps/staging/xxxx/ps”,:port=>“443”,:query=>nil=>,:scheme=>,:https=>,:get=>200
响应=>#“无转换”,“内容类型”=>“应用程序/json”,“日期”=>“周二,2015年4月28日18:40:19 GMT”,“请求Id”=>“53c8af5d-0d1c-46bf-8779-e5f6d6c8cd1a”,“服务器”=>“nginx/1.4.6(Ubuntu)”,“状态”=>“401未经授权”,“X-Content-Type-Options”=>“nosniff”,“X-Runtime”=>“0.015607713”,“内容长度”=>“61”,“连接”=>“保持活动”,@status=401>
预期(200)实际(401)

控制台仍然打开,但我想知道为什么现在每次打开prod控制台时都会收到此消息。想法?

您刚刚用完API令牌,使用延迟作业和无工作是吗?

问题在于延迟作业的重复出现。我删除了gem,错误消失了。

我正在使用延迟作业gem,并有一个专门的工人负责后台作业。我没有使用无工作模式。Doh。。。。heroku帐户宝石。。。或者。。。您是否在与同一heroku帐户关联的任何其他应用程序上使用workless?感谢您的帮助,我发现这是gem的问题,请参阅我的答案。