I have just upgraded to Ruby 1.8.7 and Rails 2.2.2. My previous project was at Ruby 1.8.6 and Rails 2.0.2. My platform is Windows and Webrick for development. When I run Webrick, the server starts without error, the application runs, database connections work and I can click through the pages and display data. But it does not serve any stylesheets or javascript files. What''s interesting is that images are displayed. In the log file, I get a 500 error after it attempts to retrieve a stylesheet or javascript. This occurs everytime. Example of attempt to retrieve prototype.js (a 500 error): ------------- 127.0.0.1 - - [17/Mar/2010:23:52:52 Eastern Daylight Time] "GET /javascripts/pro totype.js?1268882775 HTTP/1.1" 500 338 Referer -> /javascripts/prototype.js?1268882775 [2010-03-17 23:52:52] ERROR NoMethodError: private method `gsub!'' called for #<Class:0x44ee480> ------------- If I type directly into my browser''s address bar, "http://localhost:3001/javascripts/prototype.js?1268882775", I get the 500 error message as above. If I leave off "?1268882775", the browser asks me to download the JS file. I created a new rails app, started the webrick server, and it also fails to run. Any ideas what could be wrong? I''m stumped. Thanks, Chris -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Conrad Taylor
2010-Mar-18 04:42 UTC
Re: ERROR NoMethodError: private method `gsub!'' called
Sent from my iPhone On Mar 17, 2010, at 9:29 PM, Chris Mentch <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I have just upgraded to Ruby 1.8.7 and Rails 2.2.2. My previous > project > was at Ruby 1.8.6 and Rails 2.0.2. My platform is Windows and Webrick > for development. > > When I run Webrick, the server starts without error, the application > runs, database connections work and I can click through the pages and > display data. But it does not serve any stylesheets or javascript > files. What''s interesting is that images are displayed. In the log > file, I get a 500 error after it attempts to retrieve a stylesheet or > javascript. This occurs everytime. > > Example of attempt to retrieve prototype.js (a 500 error): > ------------- > 127.0.0.1 - - [17/Mar/2010:23:52:52 Eastern Daylight Time] "GET > /javascripts/pro > totype.js?1268882775 HTTP/1.1" 500 338 > Referer -> /javascripts/prototype.js?1268882775 > [2010-03-17 23:52:52] ERROR NoMethodError: private method `gsub!'' > called > for #<Class:0x44ee480> > ------------- > > If I type directly into my browser''s address bar, > "http://localhost:3001/javascripts/prototype.js?1268882775", I get the > 500 error message as above. If I leave off "?1268882775", the browser > asks me to download the JS file. > > I created a new rails app, started the webrick server, and it also > fails to run. > > Any ideas what could be wrong? I''m stumped. > > Thanks, > > ChrisChris, when you switched your app from 2.0.2 to 2.3.5, did you run ''rake rails:update'' in the root of your project? -Conrad> -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google > Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails- > talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > . > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en > . >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Chris Mentch
2010-Mar-18 04:49 UTC
Re: ERROR NoMethodError: private method `gsub!'' called
> > Chris, when you switched your app from 2.0.2 to 2.3.5, did you run > ''rake rails:update'' in the root of your project? > > -ConradIt was to 2.2.2 and, yes, I did run ''rake rails:update''. Not sure if it did anything. It didn''t give any output and returned to the command prompt. Since I was at an old rails version I tried to just upgrade to 2.1 with not luck and then upgraded to 2.2.2 to see if that would help. Same issue. Thanks for the help. Chris -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 18 March 2010 04:29, Chris Mentch <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I have just upgraded to Ruby 1.8.7 and Rails 2.2.2. My previous project > was at Ruby 1.8.6 and Rails 2.0.2. My platform is Windows and Webrick > for development. > > When I run Webrick, the server starts without error, the application > runs, database connections work and I can click through the pages and > display data. But it does not serve any stylesheets or javascript > files. What''s interesting is that images are displayed. In the log > file, I get a 500 error after it attempts to retrieve a stylesheet or > javascript. This occurs everytime. > > Example of attempt to retrieve prototype.js (a 500 error): > ------------- > 127.0.0.1 - - [17/Mar/2010:23:52:52 Eastern Daylight Time] "GET > /javascripts/pro > totype.js?1268882775 HTTP/1.1" 500 338 > Referer -> /javascripts/prototype.js?1268882775 > [2010-03-17 23:52:52] ERROR NoMethodError: private method `gsub!'' called > for #<Class:0x44ee480>Can you show us the rest of the error trace. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2010-Mar-18 11:47 UTC
Re: Re: ERROR NoMethodError: private method `gsub!'' called
On 18 March 2010 04:49, Chris Mentch <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:>> >> Chris, when you switched your app from 2.0.2 to 2.3.5, did you run >> ''rake rails:update'' in the root of your project? >> >> -Conrad > > It was to 2.2.2 and, yes, I did run ''rake rails:update''. Not sure if it > did anything. It didn''t give any output and returned to the command > prompt.You can tell whether it changed anything by checking your current version against the version in your version control repository. If you are not using one (git for example) start by setting one up. When messing about upgrading rails and so on you need to be able to track what you have done, revert experimental changes, and so on. A day or two spent learning git will be recovered very quickly. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Chris Mentch
2010-Mar-18 16:48 UTC
Re: Re: ERROR NoMethodError: private method `gsub!'' called
As much of the trace as I can get from my Windows command prompt. It doesn''t log this to log/development.log. You''ll see GET calls and then the 500 error followed by the "private method `gsub!''" error message repeatedly. Seems to affect all of the static files---stylesheets, javascripts, images. Sometimes it pulls images from my cache and if I refresh the page the image is missing again... ------------------------ C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require '' script/server:3 127.0.0.1 - - [18/Mar/2010:12:15:05 Eastern Daylight Time] "GET /javascripts/app lication.js?1263890390 HTTP/1.1" 500 338 Referer -> /javascripts/application.js?1263890390 127.0.0.1 - - [18/Mar/2010:12:15:05 Eastern Daylight Time] "GET /javascripts/jqu ery/jquery.js?1243816946 HTTP/1.1" 500 338 Referer -> /javascripts/jquery/jquery.js?1243816946 [2010-03-18 12:15:05] ERROR NoMethodError: private method `gsub!'' called for #<C lass:0x483f450> C:/ruby/lib/ruby/1.8/webrick/htmlutils.rb:16:in `escape'' C:/ruby/lib/ruby/1.8/webrick/httpresponse.rb:232:in `set_error'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:94:in ` handle_file'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:73:in ` service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' C:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:60:in ` dispatch'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/webrick. rb:66 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_ori ginal_require'' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require '' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:153:in `require'' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:521:in `new_constants_in'' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:153:in `require'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_ori ginal_require'' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require '' script/server:3 [2010-03-18 12:15:05] ERROR NoMethodError: private method `gsub!'' called for #<C lass:0x483e808> C:/ruby/lib/ruby/1.8/webrick/htmlutils.rb:16:in `escape'' C:/ruby/lib/ruby/1.8/webrick/httpresponse.rb:232:in `set_error'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:94:in ` handle_file'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:73:in ` service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' C:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:60:in ` dispatch'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/webrick. rb:66 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_ori ginal_require'' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require '' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:153:in `require'' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:521:in `new_constants_in'' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:153:in `require'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_ori ginal_require'' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require '' script/server:3 [2010-03-18 12:15:05] ERROR NoMethodError: private method `gsub!'' called for #<C lass:0x4838d90> C:/ruby/lib/ruby/1.8/webrick/htmlutils.rb:16:in `escape'' C:/ruby/lib/ruby/1.8/webrick/httpresponse.rb:232:in `set_error'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:94:in ` handle_file'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:73:in ` service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' C:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:60:in ` dispatch'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/webrick. rb:66 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_ori ginal_require'' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require '' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:153:in `require'' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:521:in `new_constants_in'' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:153:in `require'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_ori ginal_require'' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require '' script/server:3 127.0.0.1 - - [18/Mar/2010:12:15:05 Eastern Daylight Time] "GET /javascripts/cal endar_date_select/format_american.js?1226806161 HTTP/1.1" 500 338 Referer -> /javascripts/calendar_date_select/format_american.js?1226806161 127.0.0.1 - - [18/Mar/2010:12:15:05 Eastern Daylight Time] "GET /javascripts/cal endar_date_select/calendar_date_select.js?1232746900 HTTP/1.1" 500 338 Referer -> /javascripts/calendar_date_select/calendar_date_select.js?1232746900 127.0.0.1 - - [18/Mar/2010:12:15:05 Eastern Daylight Time] "GET /stylesheets/cal endar_date_select/default.css?1255528591 HTTP/1.1" 500 338 Referer -> /stylesheets/calendar_date_select/default.css?1255528591 [2010-03-18 12:15:05] ERROR NoMethodError: private method `gsub!'' called for #<C lass:0x482c178> C:/ruby/lib/ruby/1.8/webrick/htmlutils.rb:16:in `escape'' C:/ruby/lib/ruby/1.8/webrick/httpresponse.rb:232:in `set_error'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:94:in ` handle_file'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:73:in ` service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' C:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:60:in ` dispatch'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/webrick. rb:66 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_ori ginal_require'' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require '' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:153:in `require'' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:521:in `new_constants_in'' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:153:in `require'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_ori ginal_require'' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require '' script/server:3 127.0.0.1 - - [18/Mar/2010:12:15:05 Eastern Daylight Time] "GET /javascripts/jqu ery/thickbox.js?1263700042 HTTP/1.1" 500 338 Referer -> /javascripts/jquery/thickbox.js?1263700042 [2010-03-18 12:15:05] ERROR NoMethodError: private method `gsub!'' called for #<C lass:0x47f6ac0> C:/ruby/lib/ruby/1.8/webrick/htmlutils.rb:16:in `escape'' C:/ruby/lib/ruby/1.8/webrick/httpresponse.rb:232:in `set_error'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:94:in ` handle_file'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:73:in ` service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' C:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:60:in ` dispatch'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/webrick. rb:66 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_ori ginal_require'' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require '' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:153:in `require'' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:521:in `new_constants_in'' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:153:in `require'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_ori ginal_require'' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require '' script/server:3 127.0.0.1 - - [18/Mar/2010:12:15:05 Eastern Daylight Time] "GET /javascripts/cal endar_date_select/format_american.js?1226806161 HTTP/1.1" 500 338 Referer -> /javascripts/calendar_date_select/format_american.js?1226806161 [2010-03-18 12:15:05] ERROR NoMethodError: private method `gsub!'' called for #<C lass:0x47d7cf8> C:/ruby/lib/ruby/1.8/webrick/htmlutils.rb:16:in `escape'' C:/ruby/lib/ruby/1.8/webrick/httpresponse.rb:232:in `set_error'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:94:in ` handle_file'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:73:in ` service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' C:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:60:in ` dispatch'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/webrick. rb:66 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_ori ginal_require'' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require '' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:153:in `require'' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:521:in `new_constants_in'' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:153:in `require'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_ori ginal_require'' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require '' script/server:3 [2010-03-18 12:15:05] ERROR NoMethodError: private method `gsub!'' called for #<C lass:0x47d00c0> C:/ruby/lib/ruby/1.8/webrick/htmlutils.rb:16:in `escape'' C:/ruby/lib/ruby/1.8/webrick/httpresponse.rb:232:in `set_error'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:94:in ` handle_file'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:73:in ` service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' C:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'' C:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'' C:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:60:in ` dispatch'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/webrick. rb:66 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_ori ginal_require'' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require '' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:153:in `require'' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:521:in `new_constants_in'' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/de pendencies.rb:153:in `require'' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_ori ginal_require'' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require '' script/server:3 127.0.0.1 - - [18/Mar/2010:12:15:05 Eastern Daylight Time] "GET /stylesheets/cal endar_date_select/default.css?1255528591 HTTP/1.1" 500 338 Referer -> /stylesheets/calendar_date_select/default.css?1255528591 127.0.0.1 - - [18/Mar/2010:12:15:05 Eastern Daylight Time] "GET /javascripts/jqu ery/thickbox.js?1263700042 HTTP/1.1" 500 338 Referer -> /javascripts/jquery/thickbox.js?1263700042 127.0.0.1 - - [18/Mar/2010:12:15:05 Eastern Daylight Time] "GET /images/btn_logi n_sm.gif?1234253352 HTTP/1.1" 200 1543 Referer -> /images/btn_login_sm.gif?1234253352 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Chris Mentch
2010-Mar-18 17:03 UTC
Re: Re: ERROR NoMethodError: private method `gsub!'' called
Colin Law wrote:> > You can tell whether it changed anything by checking your current > version against the version in your version control repository. If > you are not using one (git for example) start by setting one up. When > messing about upgrading rails and so on you need to be able to track > what you have done, revert experimental changes, and so on. A day or > two spent learning git will be recovered very quickly. > > ColinI use subversion. Not much changed after executing "rake rails:update" on my current project. I think it mainly changed the boot.rb file. What is odd is that I even created a new rails app from scratch and it is also having the same problem serving up anything from the public folder---stylesheets, javascripts, images, etc... If I start webrick on this new app, it appears that the "new rails app" page loads with the images, but if I refresh, it immediately gives me the 500 errors on the static content. I think I''ve worked through most of the other problems related to all the various plugins I''m using, but this issue still is puzzling why even a new rails app has the same problem. Chris -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2010-Mar-18 17:14 UTC
Re: Re: Re: ERROR NoMethodError: private method `gsub!'' called
On 18 March 2010 17:03, Chris Mentch <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:>... > What is odd is that I even created a new rails app from scratch and it > is also having the same problem serving up anything from the public > folder---stylesheets, javascripts, images, etc... If I start webrick on > this new app, it appears that the "new rails app" page loads with the > images, but if I refresh, it immediately gives me the 500 errors on the > static content.Out of interest have you tried mongrel? script/server mongrel Otherwise I am out of my depth I am afraid. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Chris Mentch
2010-Mar-18 17:36 UTC
Re: Re: Re: ERROR NoMethodError: private method `gsub!'' called
> > Out of interest have you tried mongrel? > script/server mongrel > > Otherwise I am out of my depth I am afraid. > > ColinWell, I executed "gem install mongrel", then "ruby script/server webrick" and everything is loading!! What a bad problem with webrick. My staging server is mongrel, but my production is phusion passenger (which is a breeze to setup). I hope Passenger will be kind when I make the next release to production! I think it even cleared up an annoying "stack level too deep" error I was getting with webrick and not caching classes in development. Mongrel isn''t complaining. Thanks for your help! Chris -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2010-Mar-18 17:43 UTC
Re: Re: Re: Re: ERROR NoMethodError: private method `gsub!'' called
On 18 March 2010 17:36, Chris Mentch <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:>> >> Out of interest have you tried mongrel? >> script/server mongrel >> >> Otherwise I am out of my depth I am afraid. >> >> Colin > > Well, I executed "gem install mongrel", then "ruby script/server > webrick" and everything is loading!!I presume you mean "ruby script/server mongrel" Colin> What a bad problem with webrick. > My staging server is mongrel, but my production is phusion passenger > (which is a breeze to setup). I hope Passenger will be kind when I make > the next release to production! > > I think it even cleared up an annoying "stack level too deep" error I > was getting with webrick and not caching classes in development. > Mongrel isn''t complaining. > > Thanks for your help! > > Chris > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Chris Mentch
2010-Mar-18 17:58 UTC
Re: Re: Re: Re: ERROR NoMethodError: private method `gsub!'' called
>> >> Well, I executed "gem install mongrel", then "ruby script/server >> webrick" and everything is loading!! > > I presume you mean "ruby script/server mongrel" > > ColinYes... Sorry. Webrick still on the mind. ruby script/server mongrel Works! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Michael Pitman
2010-Jun-10 01:19 UTC
Re: Re: Re: Re: ERROR NoMethodError: private method `gsub!'' called
Chris Mentch wrote:>>> >>> Well, I executed "gem install mongrel", then "ruby script/server >>> webrick" and everything is loading!! >> >> I presume you mean "ruby script/server mongrel" >> >> Colin > > > Yes... Sorry. Webrick still on the mind. > > ruby script/server mongrel > > Works!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 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thank you very much! How very obvious to change that line. A pitty I haven''t tried to change it that way. But now everything works just fine. I had the nearly same problem with the same versions of Ruby and Rails but on Ubuntu. In my case stylesheets etc. were loaded after some reloading of the page. Thank you again! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Manish Nautiyal
2012-Mar-19 12:13 UTC
Re: ERROR NoMethodError: private method `gsub!'' called
thx it works for me :) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.