faker-ruby/faker · error · TypeError

tax_order parameter must be symbolizable

Error message

tax_order parameter must be symbolizable

What it means

Error "tax_order parameter must be symbolizable" thrown in faker-ruby/faker.

Source

Thrown at lib/faker/creature/bird.rb:146

        ##
        # Produces a random common name for a bird
        #
        # @param [String | Symbol | nil] tax_order Tax
        # @return [String]
        # @raises TypeError If `tax_order` cannot be converted into a Symbol
        # @raises ArgumentError If `tax_order` is not a valid taxonomic order
        #
        # @example
        #   Faker::Creature::Bird.common_name #=> 'wren'
        #
        # @faker.version next
        def common_name(tax_order = nil)
          map = translate('faker.creature.bird.order_common_map')
          if tax_order.nil?
            sample(map.values.flatten).downcase
          else
            raise TypeError, 'tax_order parameter must be symbolizable' \
              unless tax_order.respond_to?(:to_sym)
            raise ArgumentError, "#{tax_order} is not a valid taxonomic order" \
                                 unless map.keys.include?(tax_order.to_sym)

            the_order = translate('faker.creature.bird.order_common_map')[tax_order.to_sym]
            sample(the_order).downcase
          end
        end

        ##
        # Produces a random and plausible common name for a bird
        #
        # @return [String]
        #
        # @example
        #   Faker::Creature::Bird.plausible_common_name #=> 'Hellinger's Wren'
        #
        # @faker.version next

View on GitHub (pinned to cca4184947)

When it happens

Trigger: Thrown at lib/faker/creature/bird.rb:146 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of faker-ruby/faker@cca4184947 (2026-08-21). Data as JSON: /api/errors/0b542f9e3013e114. Report an issue: GitHub.