Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1074093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:04:38+00:00 2026-05-16T21:04:38+00:00

When I open up a page that’s using my CSS it will work once,

  • 0

When I open up a page that’s using my CSS it will work once, but won’t work again until you open up the CSS and re-save it. Every other time I try to directly access my CSS, it works fine. But the other times, it doesn’t work and I receive this server output:

[2010-08-01 12:49:37] ERROR NoMethodError: private method `gsub!' called for #<Class:0x7f6d0639ad80>
    /usr/lib/ruby/1.8/webrick/htmlutils.rb:16:in `escape'
    /usr/lib/ruby/1.8/webrick/httpresponse.rb:232:in `set_error'
    /var/www/rails-blog/vendor/rails/railties/lib/webrick_server.rb:94:in `handle_file'
    /var/www/rails-blog/vendor/rails/railties/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'
    /var/www/rails-blog/vendor/rails/railties/lib/webrick_server.rb:60:in `dispatch'
    /var/www/rails-blog/vendor/rails/railties/lib/commands/servers/webrick.rb:66
    /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
    /var/www/rails-blog/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
    /var/www/rails-blog/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
    /var/www/rails-blog/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
    /var/www/rails-blog/vendor/rails/railties/lib/commands/server.rb:49
    /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
    script/server:3
127.0.0.1 - - [01/Aug/2010:12:49:37 BST] "GET /stylesheets/scaffold.css HTTP/1.1" 500 343
- -> /stylesheets/scaffold.css?1280662371

The code I’m using to include the stylesheet is <%= stylesheet_link_tag 'scaffold' %>. I’ve restarted the Ruby server but with no effect. What could be causing this problem?

This is from reading one of the official guides.

This does not happen when running Mongrel.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T21:04:38+00:00Added an answer on May 16, 2026 at 9:04 pm

    This is a bug in WEBrick, see http://www.ruby-forum.com/topic/206225.

    On 10.06.2010 03:19, Michael Pitman (mcp) posted:

    To continue using Webrick, instead of
    switching to Mongrel, you can also
    just edit line 15 of
    lib/ruby/1.8/webrick/htmlutils.rb to
    read

      str = string ? string.to_s.dup : ""
    

    The problem is that NotModified
    exception is getting passed to
    HTMLUtils::escape as a class, rather
    than a string (originally raised in
    HTTPServlet::DefaultFileHandler).
    Since the only things that can really
    be HTML escaped are strings, it should
    be safe to always convert the input
    to string.

    I suspect that the potential
    performance penalty may prevent a
    solution like that from making it to
    the standard ruby library, but it’s a
    simple workaround.

    Alternatively, in the handle_file
    method of webrick’s DispatchServlet
    (lib/webrick_server.rb in the rails
    gem), before it calls res.set_error
    with the exception, you could force
    the err.message to be a string, or
    even clear the message, since I think
    it’s discarded anyway for
    NotModified.

    Michael

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making a chrome extension that will open all links on a page
I have an html page that open a popup window when the page loads.
I have to open a page from class extended from javax.swing.AbstractAction class... Is that
Every time I open a page I want to get the currently active project
i'm trying to open a page using JSoup . I've tried opening a page
If you open a web page that is not mobile-specific at all, say, http://dogpile.com
I need web page to redirect via HTML meta and open that page in
Some links on our page open in a new window using target=_blank. How can
i had use Ajax using jquery. Now i had one page and in that
When a test tries to open a page that doesn't load, and the timeout

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.