在这里发疯......我有一个我一直在使用nitrous.io的应用程序。一切正常(出现 CSS,我可以登录 Steam 并在我的数据库中创建一个条目)。伟大的!所以我把它推送到 Heroku,现在 CSS 没有出现,我无法使用我的 Steam 帐户登录。唯一加载的是我的徽标 (img) 和列名。尝试登录 Steam 时出现“我们很抱歉,但出了点问题”的错误。你可以在这里看到:http: //infinite-brushlands-2505.herokuapp.com/
对于初学者来说,整个页面应该是黑色的,而不是白色的。我已经尝试了在这里找到的所有建议,但似乎没有任何效果。我尝试切换到 Unicorn 网络服务器并运行 rake assets:precompile 以及 rake db:migrate。似乎无法弄清楚。这是heroku日志。
2013-12-26T23:37:21.653856+00:00 app[web.1]: I, [2013-12-26T23:37:21.653590 #6] INFO -- omniauth: (steam) Callback phase initiated.
2013-12-26T23:37:21.659893+00:00 app[web.1]: I, [2013-12-26T23:37:21.659713 #6] INFO -- OpenID: Error attempting to use stored discovery information: OpenID::TypeURIMismatch
2013-12-26T23:37:21.659893+00:00 app[web.1]: I, [2013-12-26T23:37:21.659808 #6] INFO -- OpenID: Attempting discovery to verify endpoint
2013-12-26T23:37:21.659893+00:00 app[web.1]: I, [2013-12-26T23:37:21.659879 #6] INFO -- OpenID: Performing discovery on http://steamcommunity.com/openid/id/76561198060154411
2013-12-26T23:37:21.851590+00:00 app[web.1]: I, [2013-12-26T23:37:21.851383 #6] INFO -- OpenID: Using 'check_authentication' with https://steamcommunity.com/openid/login
2013-12-26T23:37:21.852288+00:00 app[web.1]: I, [2013-12-26T23:37:21.852196 #6] INFO -- OpenID: WARNING: making https request to https://steamcommunity.com/openid/login witho
ut verifying server certificate; no CA path was specified.
2013-12-26T23:37:22.422434+00:00 app[web.1]: NoMethodError (undefined method `[]' for nil:NilClass):
2013-12-26T23:37:22.422434+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-steam-1.0.3/lib/omniauth/strategies/steam.rb:39:in `player'
2013-12-26T23:37:22.422795+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-openid-1.0.1/lib/omniauth/strategies/open_id.rb:81:in `callback_phase'
2013-12-26T23:37:22.422795+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:226:in `callback_call'
2013-12-26T23:37:22.422795+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:182:in `call!'
2013-12-26T23:37:22.422795+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:164:in `call'
2013-12-26T23:37:22.422434+00:00 app[web.1]:
2013-12-26T23:37:22.422434+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-steam-1.0.3/lib/omniauth/strategies/steam.rb:17:in `block in <class:Steam>'
2013-12-26T23:37:22.422434+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:106:in `instance_eval'
2013-12-26T23:37:22.422434+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:106:in `block in compile_stack'
2013-12-26T23:37:22.422434+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:105:in `each'
2013-12-26T23:37:22.422434+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:105:in `inject'
2013-12-26T23:37:22.422434+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:105:in `compile_stack'
2013-12-26T23:37:22.422434+00:00 app[web.1]: (eval):7:in `info_stack'
2013-12-26T23:37:22.422795+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:322:in `info'
2013-12-26T23:37:22.422795+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:335:in `auth_hash'
2013-12-26T23:37:22.422795+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.1.4/lib/omniauth/strategy.rb:362:in `callback_phase'
2013-12-26T23:37:22.422795+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.1.4/lib/omniauth/builder.rb:49:in `call'
2013-12-26T23:37:22.422795+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'
2013-12-26T23:37:22.422795+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in `call'
2013-12-26T23:37:22.423035+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
2013-12-26T23:37:22.423035+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack- 4.0.0/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
2013-12-26T23:37:22.423991+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
2013-12-26T23:37:22.423035+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/query_cache.rb:36:in `call'
2013-12-26T23:37:22.423035+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activerecord- 4.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
2013-12-26T23:37:22.423035+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
2013-12-26T23:37:22.423035+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:373:in `_run__1500215298515703650__call__callbacks'
2013-12-26T23:37:22.423729+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/callbacks.rb:80:in `run_callbacks'
2013-12-26T23:37:22.423729+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack- 4.0.0/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2013-12-26T23:37:22.423729+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/rack/logger.rb:38:in `call_app'
2013-12-26T23:37:22.423729+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/rack/logger.rb:21:in `block in call'
2013-12-26T23:37:22.423729+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
2013-12-26T23:37:22.423729+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
2013-12-26T23:37:22.423729+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2013-12-26T23:37:22.423729+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:67:in `block in tagged'
2013-12-26T23:37:22.423729+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:25:in `tagged'
2013-12-26T23:37:22.423729+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/tagged_logging.rb:67:in `tagged'
2013-12-26T23:37:22.423991+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/rack/logger.rb:21:in `call'
2013-12-26T23:37:22.423991+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2013-12-26T23:37:22.423991+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
2013-12-26T23:37:22.423991+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/activesupport- 4.0.0/lib/active_support/cache/strategy/local_cache.rb:83:in `call'
2013-12-26T23:37:22.423991+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0/lib/action_dispatch/middleware/static.rb:64:in `call'
2013-12-26T23:37:22.423991+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:511:in `call'
2013-12-26T23:37:22.423991+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/railties- 4.0.0/lib/rails/application.rb:97:in `call'
2013-12-26T23:37:22.423991+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/unicorn-4.7.0/lib/unicorn/http_server.rb:580:in `process_client'
2013-12-26T23:37:22.423991+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/unicorn-4.7.0/lib/unicorn/http_server.rb:660:in `worker_loop'
2013-12-26T23:37:22.424448+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/unicorn-4.7.0/lib/unicorn/http_server.rb:527:in `spawn_missing_workers'
2013-12-26T23:37:22.424448+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/unicorn-4.7.0/lib/unicorn/http_server.rb:153:in `start'
2013-12-26T23:37:22.424448+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/unicorn-4.7.0/bin/unicorn:126:in `<top (required)>'
2013-12-26T23:37:22.424448+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/bin/unicorn:23:in `load'
2013-12-26T23:37:22.424448+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/bin/unicorn:23:in `<main>'
2013-12-26T23:37:22.424448+00:00 app[web.1]:
2013-12-26T23:37:22.424448+00:00 app[web.1]:
2013-12-26T23:37:22.445825+00:00 heroku[router]: at=info method=GET path=/auth/steam/callback? _method=post&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_
res&openid.op_endpoint=https%3A%2F%2Fsteamcommunity.com%2Fopenid%2Flogin&openid.claimed_id=h ttp%3A%2F%2Fsteamcommunity.com%2Fopenid%2Fid%2F76561198060154411&openid.identity=ht
tp%3A%2F%2Fsteamcommunity.com%2Fopenid%2Fid%2F76561198060154411&openid.return_to=http%3A%2F%2Finfinite-brushlands-2505.herokuapp.com%2Fauth%2Fsteam%2Fcallback%3F_method%3Dpost
&openid.response_nonce=2013-12-26T23%3A37%3A21Zh2xO6mo%2Bu9aMyRqJc3lvwYrc0ao%3D&openid.assoc_handle=1234567890&openid.signed=signed%2Cop_endpoint%2Cclaimed_id%2Cidentity%2Cret
这是我的 Gemfile:
source 'https://rubygems.org'
gem 'rails', '4.0.0'
# use Steam OpenID Omniauth gem for authenticating Steam users
gem 'omniauth-steam'
gem 'figaro'
gem 'has_scope'
gem "therubyracer"
gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS
gem 'will_paginate', '~> 3.0.5'
#cyborg bootswatch theme
gem 'twitter-bootswatch-rails', :git => 'git://github.com/scottvrosenthal/twitter- bootswatch-rails.git'
# Use postgresql as the database for Active Record
gem 'pg'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
# for pushing to heroku
group :production, :staging do
gem 'pg'
gem 'rails_12factor'
end
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the app server
gem 'unicorn'
ruby "2.0.0"
非常感谢大家。如果我需要发布更多信息,请告诉我;我对此很陌生!