NamedError with Roo and xlsx

Ruby Error when accessing xlsx file using roo. This script was working
until recently my system crashed and then I had to reinstall the latest
versions of Ruby and Roo. now I am getting uninitialized constant (NamedError). The name a locatio of the file is correct, even
hardcoding the filename presents the same error.

I am running Ruby 1.9.3 and Roo 1.10.2
Here is the relevant part of the code:

require ‘rubygems’
require ‘roo’

class Fixnum
def zeros
“%0#{self}d” % 0

class String
def numeric?
# Check if every character is numeric

class BudgetParser
def initialize(options)
@budgetfile=File.basename(options[:file], ‘.*’)
@filename =
@workbook =
@workbook.default_sheet = options[:sheet] || ‘Sheet1’
@budget_year = options[:year] ||
@conversions = %w(} J K L M N O P Q R)

Any help would be appreciated!

Problem is with latest version of roo 1.10.2, uninstalled that and
re-installed older version 1.9.5…the program now runs perfectly…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs