This project is archived and is in readonly mode.

#4604 ✓committed
Fabian Schwahn

number_to_currency fails with "NoMethodError: undefined method `>=' for nil:NilClass"

Reported by Fabian Schwahn | May 15th, 2010 @ 04:55 PM | in 3.0.2

The title says it pretty much.
I use rvm, in this case ruby-1.8.7-p249. Seems to me like a ruby problem.
Output from Rails console:

Loading development environment (Rails 3.0.0.beta3)
ruby-1.8.7-p249 > foo = ActionView::Base.new
ruby-1.8.7-p249 > foo.extend ActionView::Helpers::NumberHelper
ruby-1.8.7-p249 > foo.number_to_currency(101.00)
NoMethodError: undefined method `>=' for nil:NilClass
    from /Users/fabianschwahn/.rvm/gems/ruby-1.8.7-p249@bluemoody-rails3/gems/activesupport-3.0.0.beta3/lib/active_support/whiny_nil.rb:48:in `method_missing'
    from /Users/fabianschwahn/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/rational.rb:526:in `**'
    from /Users/fabianschwahn/.rvm/gems/ruby-1.8.7-p249@bluemoody-rails3/gems/actionpack-3.0.0.beta3/lib/action_view/helpers/number_helper.rb:285:in `number_with_precision'
    from /Users/fabianschwahn/.rvm/gems/ruby-1.8.7-p249@bluemoody-rails3/gems/actionpack-3.0.0.beta3/lib/action_view/helpers/number_helper.rb:115:in `number_to_currency'
    from (irb):3

Comments and changes to this ticket

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>