Error: <main>: uninitialized constant Excelx (NameError)

1,981 views
Skip to first unread message

fabian....@gmail.com

unread,
Mar 19, 2013, 3:50:44 PM3/19/13
to ruby...@googlegroups.com
Guys,

I'm new to roo and I'm tryong to automate some spreadsheet work, so I downloaded the roo gem as indicated in the website but I get this error:

C:/test.rb:15:in `<main>': uninitialized constant Excelx (NameError)

My code is simple:

require 'rubygems'
require 'roo'

s = Excelx.new('test.xlsx')      # creates an Openoffice Spreadsheet instance
s.default_sheet = 'Backup'
s.set_value(14, 4, 'TEST')

Strangely, this is fixed by adding include Roo after the require statements ...

Any idea?
Fabian

Thomas Preymesser

unread,
Mar 20, 2013, 1:23:04 PM3/20/13
to ruby...@googlegroups.com

I think you are not using one of my releases. I'm currently not maintaining roo (see http://groups.google.com/group/ruby-roo/browse_thread/thread/d22e47d405c45c9).

-Thomas

fabian....@gmail.com

unread,
Mar 20, 2013, 6:06:12 PM3/20/13
to ruby...@googlegroups.com
wow ... I just installed roo gem from the commandline as the website says. Where would I get the newest release from?

Christian Southgate

unread,
Apr 23, 2013, 2:59:02 PM4/23/13
to ruby...@googlegroups.com
I fixed this problem by installing an older version: 1.10.1

The command to do this is: gem install roo -v 1.10.1
It'll automatically roll back any dependencies for you.

I'm using ruby 1.8.7 by the way.

Sammy Larbi

unread,
May 7, 2013, 1:55:25 PM5/7/13
to ruby...@googlegroups.com
A better way would be to look at the now official docs, from what I can tell:


Everything is now namespaced under the Roo module, so the example code should read:

  Roo::Excel.new

instead of just `Excel.new`

My guess is the current maintainer either doesn't have access to the old rubyforge website, or if they do, they didn't think about updating it.

Sam

Chris Southgate

unread,
May 8, 2013, 8:55:31 AM5/8/13
to ruby...@googlegroups.com
I had no idea that this existed - thanks very much!

--
You received this message because you are subscribed to a topic in the Google Groups "ruby-roo" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ruby-roo/6KowNoERwIU/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to ruby-roo+u...@googlegroups.com.
To post to this group, send email to ruby...@googlegroups.com.
Visit this group at http://groups.google.com/group/ruby-roo?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages