Possible bug in singularize method.
marcello opened this issue · 2 comments
marcello commented
Hi, advices? See next for debug.
$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
$ gem list
abstract (1.0.0)
actionmailer (3.2.1, 3.2.0, 3.0.11, 3.0.9)
actionpack (3.2.1, 3.2.0, 3.0.11, 3.0.9)
activemodel (3.2.1, 3.2.0, 3.0.11, 3.0.9)
activerecord (3.2.1, 3.2.0, 3.0.11, 3.0.9)
activeresource (3.2.1, 3.2.0, 3.0.11, 3.0.9)
activesupport (3.2.1, 3.2.0, 3.0.11, 3.0.9)
acts-as-taggable-on (2.2.2, 2.1.1)
acts_as_list (0.1.5, 0.1.4)
arel (3.0.2, 3.0.0, 2.0.10)
authlogic (3.1.0)
awesome_print (1.0.2, 1.0.1)
bigdecimal (1.1.0)
builder (3.0.0, 2.1.2)
bundler (1.0.21)
cells (3.7.0)
cocaine (0.2.1, 0.2.0)
coderay (1.0.5, 0.9.8)
daemons (1.0.10)
diff-lcs (1.1.3)
dispatcher (0.0.1)
erubis (2.7.0, 2.6.6)
eventmachine (0.12.10)
execjs (1.3.0)
gem_plugin (0.2.3)
grit (2.4.1)
hike (1.2.1)
htmlentities (4.3.1)
i18n (0.6.0, 0.5.0)
io-console (0.3)
journey (1.0.3, 1.0.1)
jquery-rails (2.0.1, 1.0.19)
json (1.6.5, 1.6.3, 1.5.4)
kaminari (0.13.0)
libv8 (3.3.10.4 x86_64-linux)
mail (2.4.1, 2.2.19)
method_source (0.7.1, 0.6.7)
mime-types (1.17.2)
minitest (2.5.1)
mongrel (1.2.0.pre2)
multi_json (1.1.0, 1.0.4)
nokogiri (1.5.2)
pg (0.13.2, 0.11.0)
polyglot (0.3.3)
pry (0.9.8.2, 0.9.7.4)
pry-doc (0.3.0)
pry-rails (0.1.6, 0.0.4)
rack (1.4.1, 1.2.4)
rack-cache (1.1)
rack-mount (0.6.14)
rack-ssl (1.3.2)
rack-test (0.6.1, 0.5.7)
rails (3.2.1, 3.2.0, 3.0.11, 3.0.9)
railties (3.2.1, 3.2.0, 3.0.11, 3.0.9)
rake (0.9.2.2)
rdoc (3.12, 3.11, 3.9.4)
rodf (0.2.0)
rspec (2.8.0)
rspec-core (2.8.0)
rspec-expectations (2.8.0)
rspec-mocks (2.8.0)
rspec-rails (2.8.1)
ruby_parser (2.3.1)
rubyzip (0.9.7)
sass (3.1.15, 3.1.11)
sass-rails (3.2.4)
sexp_processor (3.0.8)
simple_form (1.5.2)
slop (2.4.4, 2.1.0)
sprockets (2.1.2)
therubyracer (0.9.10, 0.9.9)
thin (1.3.1)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.31)
uglifier (1.2.3)
valid_attribute (1.2.0)
yard (0.7.4)
$ cat rodf.rb
#!/usr/bin/env ruby
# encoding: UTF-8
require 'rubygems'
require 'odf/spreadsheet'
require 'active_support/inflector'
ODF::Spreadsheet.file("my-spreadsheet.ods") do |spreadsheet|
spreadsheet.table 'My first table from Ruby' do |table|
table.row {|row| row.cell 'Hello, rODF world!' }
end
end
$ ruby rodf.rb
.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rodf-0.2.0/lib/odf/container.rb:27:in `block in contains': undefined method `singularize' for "style_sections":String (NoMethodError)
from .rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rodf-0.2.0/lib/odf/container.rb:26:in `each'
from .rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rodf-0.2.0/lib/odf/container.rb:26:in `contains'
from .rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rodf-0.2.0/lib/odf/data_style.rb:27:in `<class:DataStyle>'
from .rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rodf-0.2.0/lib/odf/data_style.rb:26:in `<module:ODF>'
from .rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rodf-0.2.0/lib/odf/data_style.rb:25:in `<top (required)>'
from .rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from .rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
from .rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rodf-0.2.0/lib/odf/spreadsheet.rb:22:in `<top (required)>'
from .rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `require'
from .rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
from .rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from rodf.rb:4:in `<main>'
thiagoarrais commented
Would you mind trying with version 0.2.1 (that I just published)?
marcello commented
Off course, I tried and works fine. Thanks!