Forum: Ruby on Rails Upgrade to Ruby 1.8.6 broke my app

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
073c197b3c34cabc15cac2421e94ec41?d=identicon&s=25 Cali Wildman (caliwildman)
on 2009-05-10 18:21
I recently upgraded my Windows dev machine to Ruby 1.8.6 p287 Rails
2.3.2, my previous setup was Ruby 1.8.5 and Rails 2.1. My app was
running fine until I upgraded Ruby. Here's the error stack

Processing TabController#index (for 127.0.0.1 at 2009-05-09 21:05:30)
[GET]
  Session ID: 0356258fa1b9339a1aca32d4df27dcae
  Parameters: {"action"=>"index", "controller"=>"tab"}
  ?[4;36;1mSQL (0.000000)?[0m   ?[0;1mSET NAMES 'utf8'?[0m
  ?[4;35;1mEntry Columns (0.015000)?[0m   ?[0mSHOW FIELDS FROM
entries?[0m
  ?[4;36;1mEntry Indexes (0.016000)?[0m   ?[0;1mSHOW KEYS FROM
entries?[0m
  ?[4;35;1mSQL (0.000000)?[0m   ?[0mSELECT count(*) AS count_all FROM
entries OR
DER BY entries.created_at DESC ?[0m
  ?[4;36;1mEntry Load (0.000000)?[0m   ?[0;1mSELECT * FROM entries ORDER
BY entr
ies.created_at DESC LIMIT 0, 10?[0m


NoMethodError (private method `gsub' called for 140:Fixnum):
    c:/ruby/lib/ruby/1.8/rexml/text.rb:292:in `normalize'
    c:/ruby/lib/ruby/1.8/rexml/element.rb:1085:in `[]='
    /app/controllers/application.rb:57:in `resize_videos'
    c:/ruby/lib/ruby/1.8/rexml/element.rb:891:in `each'
    c:/ruby/lib/ruby/1.8/rexml/xpath.rb:53:in `each'
    c:/ruby/lib/ruby/1.8/rexml/element.rb:891:in `each'
    c:/ruby/lib/ruby/1.8/rexml/element.rb:393:in `each_element'
    /app/controllers/application.rb:56:in `resize_videos'
    /vendor/plugins/will_paginate/lib/will_paginate/paginated_collection.rb:24:i
n `each'
    /vendor/plugins/will_paginate/lib/will_paginate/paginated_collection.rb:24:i
n `each'
    /app/controllers/application.rb:54:in `resize_videos'
    /app/controllers/tab_controller.rb:34:in `index'
    /vendor/rails/actionpack/lib/action_controller/base.rb:1095:in
`send'
    /vendor/rails/actionpack/lib/action_controller/base.rb:1095:in
`perform_acti
on_without_filters'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:632:in
`call_filte
r'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:638:in
`call_filte
r'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:438:in
`call'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:637:in
`call_filte
r'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:619:in
`perform_ac
tion_without_benchmark'
    /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in
`perfor
m_action_without_rescue'
    c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
    /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in
`perfor
m_action_without_rescue'
    /vendor/rails/actionpack/lib/action_controller/rescue.rb:83:in
`perform_acti
on'
    /vendor/rails/actionpack/lib/action_controller/base.rb:430:in `send'
    /vendor/rails/actionpack/lib/action_controller/base.rb:430:in
`process_witho
ut_filters'
    /vendor/rails/actionpack/lib/action_controller/filters.rb:624:in
`process_wi
thout_session_management_support'
    /vendor/rails/actionpack/lib/action_controller/session_management.rb:114:in
`process'
    /vendor/rails/actionpack/lib/action_controller/base.rb:330:in
`process'
    /vendor/rails/railties/lib/dispatcher.rb:41:in `dispatch'
    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/rails.rb:78
:in `process'
    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/rails.rb:76
:in `synchronize'
    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/rails.rb:76
:in `process'
    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:618:in
`
process_client'
    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:617:in
`
each'
    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:617:in
`
process_client'
    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:736:in
`
run'
    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:736:in
`
initialize'
    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:736:in
`
new'
    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:736:in
`
run'
    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:720:in
`
initialize'
    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:720:in
`
new'
    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel.rb:720:in
`
run'
    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/configurato
r.rb:271:in `run'
    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/configurato
r.rb:270:in `each'
    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/configurato
r.rb:270:in `run'
    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/bin/mongrel_rails:127:i
n `run'
    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/command.rb:
211:in `run'
    c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/bin/mongrel_rails:243
    /vendor/rails/activesupport/lib/active_support/dependencies.rb:489:in
`load'

    /vendor/rails/activesupport/lib/active_support/dependencies.rb:489:in
`load'

    /vendor/rails/activesupport/lib/active_support/dependencies.rb:343:in
`new_c
onstants_in'
    /vendor/rails/activesupport/lib/active_support/dependencies.rb:489:in
`load'

    /vendor/rails/railties/lib/commands/servers/mongrel.rb:60
    c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_origina
l_require'
    c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
    /vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in
`requi
re'
    /vendor/rails/activesupport/lib/active_support/dependencies.rb:343:in
`new_c
onstants_in'
    /vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in
`requi
re'
    /vendor/rails/railties/lib/commands/server.rb:39
    script/server:3:in `require'
    script/server:3


Rendering
./script/../config/../vendor/rails/actionpack/lib/action_controller/te
mplates/rescues/layout.rhtml (500 Internal Error)

Does anyone know what caused the error? I'm going to dig in but hoping
for a quick answer if someone already encountered this problem. Thanks.
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-05-10 19:09
(Received via mailing list)
On May 10, 5:21 pm, Cali Wildman <rails-mailing-l...@andreas-s.net>
wrote:
> I recently upgraded my Windows dev machine to Ruby 1.8.6 p287 Rails
> 2.3.2, my previous setup was Ruby 1.8.5 and Rails 2.1. My app was
> running fine until I upgraded Ruby. Here's the error stack
>
>
> NoMethodError (private method `gsub' called for 140:Fixnum):
>     c:/ruby/lib/ruby/1.8/rexml/text.rb:292:in `normalize'
>     c:/ruby/lib/ruby/1.8/rexml/element.rb:1085:in `[]='
>     /app/controllers/application.rb:57:in `resize_videos'

Might there be something interesting in this part of your app ?

Fred
073c197b3c34cabc15cac2421e94ec41?d=identicon&s=25 Cali Wildman (caliwildman)
on 2009-05-10 22:32
Frederick Cheung wrote:
> On May 10, 5:21�pm, Cali Wildman <rails-mailing-l...@andreas-s.net>
> wrote:
>> I recently upgraded my Windows dev machine to Ruby 1.8.6 p287 Rails
>> 2.3.2, my previous setup was Ruby 1.8.5 and Rails 2.1. My app was
>> running fine until I upgraded Ruby. Here's the error stack
>>
>>
>> NoMethodError (private method `gsub' called for 140:Fixnum):
>> � � c:/ruby/lib/ruby/1.8/rexml/text.rb:292:in `normalize'
>> � � c:/ruby/lib/ruby/1.8/rexml/element.rb:1085:in `[]='
>> � � /app/controllers/application.rb:57:in `resize_videos'
>
> Might there be something interesting in this part of your app ?
>
> Fred

Remember this is the exact same code that runs fine with Ruby 1.8.5 with
Rails 2.3.2. it works fine if I switch the Ruby environment variable to
1.8.5. So either 1.8.6 fixed a bug that didn't manifest in 1.8.5 or
changed the API causing it to break.
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-05-10 23:47
(Received via mailing list)
On May 10, 9:32 pm, Cali Wildman <rails-mailing-l...@andreas-s.net>
wrote:
>
> Remember this is the exact same code that runs fine with Ruby 1.8.5 with
> Rails 2.3.2. it works fine if I switch the Ruby environment variable to
> 1.8.5. So either 1.8.6 fixed a bug that didn't manifest in 1.8.5 or
> changed the API causing it to break.

Entirely possible. Either way the closest bit of app code that is
yours in the stack trace is still interesting.

Fred
This topic is locked and can not be replied to.