small medium large xlarge

Generic-user-small
08 Feb 2011, 22:22
Cliff Kachinske (2 posts)

Closed. See next post.

Can someone point me in the right direction to solve this?

I have completed Ch 6 and I’m getting this odd behavior.

Point browser to localhost:3000/products.

Images don’t display. Browser shows alt instead. WEBrick throws an error like this, with a stack trace. ERROR NoMethodError: private method `gsub!’ called for #

Refresh page. Images show. No WEBrick errors.

Rails 2.2.2, Ruby 1.87 patchlevel 249, x86_64-linux Ubuntu 10.04

Error message with stack trace: [2011-02-08 11:43:58] ERROR NoMethodError: private method gsub!' called for #<Class:0x7ffbcac8ed08> /usr/lib/ruby/1.8/webrick/htmlutils.rb:18:in escape’ /usr/lib/ruby/1.8/webrick/httpresponse.rb:232:in set_error' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:94:in handle_file’ /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:73:in service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in service’ /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/lib/ruby/1.8/webrick/server.rb:173:in start_thread’ /usr/lib/ruby/1.8/webrick/server.rb:162:in start' /usr/lib/ruby/1.8/webrick/server.rb:162:in start_thread’ /usr/lib/ruby/1.8/webrick/server.rb:95:in start' /usr/lib/ruby/1.8/webrick/server.rb:92:in each’ /usr/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/lib/ruby/1.8/webrick/server.rb:23:in start’ /usr/lib/ruby/1.8/webrick/server.rb:82:in start' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:60:in dispatch’ /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/webrick.rb:66 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in gem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in require’ /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in require' /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in new_constants_in’ /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in require' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in gem_original_require’ /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:29:in `require’ script/server:3

Generic-user-small
08 Feb 2011, 22:21
Cliff Kachinske (2 posts)

Urk, found it with effective Googling.

It’s a bug in WEBrick.

Workaround at http://stackoverflow.com/questions/3394040/ruby-on-rails-odd-stylesheet-issue

Probably answered here, too.

After applying the fix described in the link, restart WEBrick, then open and save your stylesheets WEBrick will fetch them, too.

You must be logged in to comment