This project is archived and is in readonly mode.

#4823 ✓wontfix
Micke Lisinge

Rails 3 beta4 Activesupport error

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

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

Comments and changes to this ticket

  • DHH

    DHH June 10th, 2010 @ 05:01 PM

    • Assigned user set to “Yehuda Katz (wycats)”
  • José Valim

    José Valim June 10th, 2010 @ 06:54 PM

    • State changed from “new” to “wontfix”

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

  • Lamnk

    Lamnk July 2nd, 2010 @ 02:01 AM

    • Importance changed from “” to “Low”

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

  • siplux

    siplux July 5th, 2010 @ 12:53 AM

    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>'
    
  • Rohit Arondekar

    Rohit Arondekar July 5th, 2010 @ 05:33 AM

    -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"
    
  • alasiri
  • csnk

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages