ysbaddaden / prax

Rack proxy server for development
http://ysbaddaden.github.io/prax/
Other
475 stars 49 forks source link

Assets stop working randomly #111

Closed westonganger closed 9 years ago

westonganger commented 9 years ago

All of my assets stop working but the page still loads. This originally happened after adding a .env file but I reinstalled prax and got it working but now all of a sudden its back. It could be possible its not using the gems specified in my Gemfile because my rack version is locked at 1.4.5 yet in the error below its using 1.6.0.beta2. I tried added the .praxconfig file from the wiki page to no avail.

I, [2014-12-12T15:24:20.325741 #13791] INFO -- : Respawning failed worker E, [2014-12-12T15:24:20.326077 #13791] ERROR -- : NameError: uninitialized constant Rack::File::CONTENT_TYPE /home/weston/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rack-1.6.0.beta2/lib/rack/file.rb:67:in serving' /opt/prax/lib/prax/public_file.rb:20:instream_to' /opt/prax/lib/prax/handler.rb:19:in handle' /opt/prax/lib/prax.rb:20:inperform' /opt/prax/lib/prax/microworker.rb:84:in block in work' /opt/prax/lib/prax/microworker.rb:77:ineach' /opt/prax/lib/prax/microworker.rb:77:in work' /opt/prax/lib/prax/microworker.rb:63:inblock in spawn'

ysbaddaden commented 9 years ago

Maybe there are 2 problems here:

  1. what's your Ruby version manager?
  2. maybe Rack 1.6+ dropped a constant. I'll have a look.
ysbaddaden commented 9 years ago

I was missing a simple require "rack" which defines the CONTENT_TYPE constant.