Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Rails 3 beta4 Activesupport error

#4823

I am using ruby 1.9.1 on Windows and after upgrading from Rails 3 beta3 to beta4 i get this error:

undefined method `consumes?' for ActiveSupport::Multibyte::Chars:Class

in app/controllers/account/register_controller.rb:10:in `signup'

and register_controller looks like

# encoding: utf-8
class Account::RegisterController < ApplicationController

  def signup
    @title = 'Registrering'

    @user = User.new(params[:user])
    if @user.save
      session.delete(:registration_password)
      sign_in @user
    else
      render 'index'
    end
  end

  def index
    @user = User.new
  end

end

Reported by Micke Lisinge · June 10th, 2010 @ 03:18 PM

State: wontfix
Milestone: none
Assigned to: Yehuda Katz (wycats) Yehuda Katz (wycats)
Importance: Low

Activity

  1. DHH
    DHH
    • Assigned user set to Yehuda Katz (wycats)

    June 10th, 2010 @ 05:01 PM

  2. José Valim
    José Valim
    • State changed from new to wontfix

    Ruby 1.9.1 is not supported. Please update to Ruby 1.9.2 preview-3.

    June 10th, 2010 @ 06:54 PM

  3. Lamnk
    Lamnk
    • Importance changed from to Low

    Got the same error with ruby 1.9.2dev (2010-07-01 revision 28513) linux

    July 2nd, 2010 @ 02:01 AM

  4. siplux
    siplux

    Receiving the same error on Ruby 1.9.2 RC1 (ruby 1.9.2dev (2010-07-02 revision 28524) [x86_64-linux])

    In console

    >> "foo".truncate(10)
    NameError: undefined method `<=>' for class `ActiveSupport::Multibyte::Chars'
            from /home/siplux/.rvm/gems/ruby-1.9.2-rc1/gems/activesupport-3.0.0.beta4/lib/active_support/multibyte/chars.rb:49:in `<class:Chars>'
            from /home/siplux/.rvm/gems/ruby-1.9.2-rc1/gems/activesupport-3.0.0.beta4/lib/active_support/multibyte/chars.rb:36:in `<module:Multibyte>'
            from /home/siplux/.rvm/gems/ruby-1.9.2-rc1/gems/activesupport-3.0.0.beta4/lib/active_support/multibyte/chars.rb:6:in `<module:ActiveSupport>'
            from /home/siplux/.rvm/gems/ruby-1.9.2-rc1/gems/activesupport-3.0.0.beta4/lib/active_support/multibyte/chars.rb:5:in `<top (required)>'
            from /home/siplux/.rvm/gems/ruby-1.9.2-rc1/gems/activesupport-3.0.0.beta4/lib/active_support/multibyte.rb:22:in `proxy_class'
            from /home/siplux/.rvm/gems/ruby-1.9.2-rc1/gems/activesupport-3.0.0.beta4/lib/active_support/core_ext/string/multibyte.rb:40:in `mb_chars'
            from /home/siplux/.rvm/gems/ruby-1.9.2-rc1/gems/activesupport-3.0.0.beta4/lib/active_support/core_ext/string/filters.rb:42:in `truncate'
            from (irb):1
            from /home/siplux/.rvm/gems/ruby-1.9.2-rc1/gems/railties-3.0.0.beta4/lib/rails/commands/console.rb:47:in `start'
            from /home/siplux/.rvm/gems/ruby-1.9.2-rc1/gems/railties-3.0.0.beta4/lib/rails/commands/console.rb:8:in `start'
            from /home/siplux/.rvm/gems/ruby-1.9.2-rc1/gems/railties-3.0.0.beta4/lib/rails/commands.rb:23:in `<top (required)>'
            from script/rails:9:in `require'
            from script/rails:9:in `<main>'
    

    Calling it a second time gives a different message

    >> "foo".truncate(10)
    NoMethodError: undefined method `consumes?' for ActiveSupport::Multibyte::Chars:Class
            from /home/siplux/.rvm/gems/ruby-1.9.2-rc1/gems/activesupport-3.0.0.beta4/lib/active_support/core_ext/string/multibyte.rb:40:in `mb_chars'
            from /home/siplux/.rvm/gems/ruby-1.9.2-rc1/gems/activesupport-3.0.0.beta4/lib/active_support/core_ext/string/filters.rb:42:in `truncate'
            from (irb):3
            from /home/siplux/.rvm/gems/ruby-1.9.2-rc1/gems/railties-3.0.0.beta4/lib/rails/commands/console.rb:47:in `start'
            from /home/siplux/.rvm/gems/ruby-1.9.2-rc1/gems/railties-3.0.0.beta4/lib/rails/commands/console.rb:8:in `start'
            from /home/siplux/.rvm/gems/ruby-1.9.2-rc1/gems/railties-3.0.0.beta4/lib/rails/commands.rb:23:in `<top (required)>'
            from script/rails:9:in `require'
            from script/rails:9:in `<main>'
    

    July 5th, 2010 @ 12:53 AM

  5. Rohit Arondekar
    Rohit Arondekar

    -1, does not happen in Linux on 1.9.2 RC1 or 1.9.2-head on a freshly created app using Rails master.

    ruby -v => ruby 1.9.2dev (2010-07-02 revision 28524) [x86_64-linux]

    ruby-1.9.2-rc1 > "foo".truncate(10)
     => "foo" 
    ruby-1.9.2-rc1 > "foo".truncate(10)
     => "foo"
    

    ruby -v => ruby 1.9.2dev (2010-07-02 revision 28522) [x86_64-linux]

    ruby-1.9.2-head > "foo".truncate(10)
     => "foo" 
    ruby-1.9.2-head > "foo".truncate(10)
     => "foo"
    

    July 5th, 2010 @ 05:33 AM

  6. alasiri