You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just tried the simple sinatra example of running
require 'sinatra'
get '/' do
'Hello world!'
end
(based on rack) and ran into
% ruby sitest.rb
/var/lib/gems/2.3.0/gems/rack-2.0.1/lib/rack/show_exceptions.rb:16: warning: already initialized constant Rack::ShowExceptions::CONTEXT
/usr/lib/ruby/vendor_ruby/rack/showexceptions.rb:16: warning: previous definition of CONTEXT was here
/var/lib/gems/2.3.0/gems/rack-2.0.1/lib/rack/show_exceptions.rb:114: warning: already initialized constant Rack::ShowExceptions::TEMPLATE
/usr/lib/ruby/vendor_ruby/rack/showexceptions.rb:115: warning: previous definition of TEMPLATE was here
== Sinatra (v1.4.7) has taken the stage on 4567 for development with backup from Thin
Thin web server (v1.6.3 codename Protein Powder)
Maximum connections set to 1024
Listening on localhost:4567, CTRL+C to stop
Unexpected error while processing request: uninitialized constant Rack::Request::Helpers::HTTP_HOST
/var/lib/gems/2.3.0/gems/rack-2.0.1/lib/rack/request.rb:229:in host_with_port' /var/lib/gems/2.3.0/gems/rack-2.0.1/lib/rack/request.rb:235:in host'
(erb):124:in pretty' /usr/lib/ruby/2.3.0/erb.rb:864:in eval'
/usr/lib/ruby/2.3.0/erb.rb:864:in result' /var/lib/gems/2.3.0/gems/rack-2.0.1/lib/rack/show_exceptions.rb:96:in pretty'
/usr/lib/ruby/vendor_ruby/sinatra/show_exceptions.rb:34:in rescue in call' /usr/lib/ruby/vendor_ruby/sinatra/show_exceptions.rb:25:in call'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:182:in call' /usr/lib/ruby/vendor_ruby/sinatra/base.rb:2013:in call'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1487:in block in call' /usr/lib/ruby/vendor_ruby/sinatra/base.rb:1787:in synchronize'
/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1487:in call' /usr/lib/ruby/vendor_ruby/thin/connection.rb:86:in block in pre_process'
/usr/lib/ruby/vendor_ruby/thin/connection.rb:84:in catch' /usr/lib/ruby/vendor_ruby/thin/connection.rb:84:in pre_process'
/usr/lib/ruby/vendor_ruby/eventmachine.rb:1054:in call' /usr/lib/ruby/vendor_ruby/eventmachine.rb:1054:in block in spawn_threadpool'
Has trouble finding the definition of HTTP_HOST
The text was updated successfully, but these errors were encountered:
Rack::HTTP_HOST has been set since 131d9fd. Constant lookup of HTTP_HOST inside Rack::Request::Helpers#host_with_port should find Rack::HTTP_HOST. I'm not sure if this is an issue with an old version of Sinatra, or related to Thin, but it doesn't appear to be a problem with Rack itself. If you still believe this is a problem with Rack itself, please submit a failing test or self-contained example showing the problem, without using any other libraries.
Hi,
I just tried the simple sinatra example of running
require 'sinatra'
get '/' do
'Hello world!'
end
(based on rack) and ran into
% ruby sitest.rb
/var/lib/gems/2.3.0/gems/rack-2.0.1/lib/rack/show_exceptions.rb:16: warning: already initialized constant Rack::ShowExceptions::CONTEXT
/usr/lib/ruby/vendor_ruby/rack/showexceptions.rb:16: warning: previous definition of CONTEXT was here
/var/lib/gems/2.3.0/gems/rack-2.0.1/lib/rack/show_exceptions.rb:114: warning: already initialized constant Rack::ShowExceptions::TEMPLATE
/usr/lib/ruby/vendor_ruby/rack/showexceptions.rb:115: warning: previous definition of TEMPLATE was here
== Sinatra (v1.4.7) has taken the stage on 4567 for development with backup from Thin
Thin web server (v1.6.3 codename Protein Powder)
Maximum connections set to 1024
Listening on localhost:4567, CTRL+C to stop
Unexpected error while processing request: uninitialized constant Rack::Request::Helpers::HTTP_HOST
/var/lib/gems/2.3.0/gems/rack-2.0.1/lib/rack/request.rb:229:in
host_with_port' /var/lib/gems/2.3.0/gems/rack-2.0.1/lib/rack/request.rb:235:in
host'(erb):124:in
pretty' /usr/lib/ruby/2.3.0/erb.rb:864:in
eval'/usr/lib/ruby/2.3.0/erb.rb:864:in
result' /var/lib/gems/2.3.0/gems/rack-2.0.1/lib/rack/show_exceptions.rb:96:in
pretty'/usr/lib/ruby/vendor_ruby/sinatra/show_exceptions.rb:34:in
rescue in call' /usr/lib/ruby/vendor_ruby/sinatra/show_exceptions.rb:25:in
call'/usr/lib/ruby/vendor_ruby/sinatra/base.rb:182:in
call' /usr/lib/ruby/vendor_ruby/sinatra/base.rb:2013:in
call'/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1487:in
block in call' /usr/lib/ruby/vendor_ruby/sinatra/base.rb:1787:in
synchronize'/usr/lib/ruby/vendor_ruby/sinatra/base.rb:1487:in
call' /usr/lib/ruby/vendor_ruby/thin/connection.rb:86:in
block in pre_process'/usr/lib/ruby/vendor_ruby/thin/connection.rb:84:in
catch' /usr/lib/ruby/vendor_ruby/thin/connection.rb:84:in
pre_process'/usr/lib/ruby/vendor_ruby/eventmachine.rb:1054:in
call' /usr/lib/ruby/vendor_ruby/eventmachine.rb:1054:in
block in spawn_threadpool'Has trouble finding the definition of HTTP_HOST
The text was updated successfully, but these errors were encountered: