Saturday, June 22, 2013

Re: [Rails] `require': cannot load such file -- nokogiri (LoadError) in rubyXL

Muthu Selvan <pearl.selvan@gmail.com> wrote:
> My requirement is : I want read / write the excel sheet ( both xls / xlsx ) from Ruby , if you have any other solution also share with me ..

You may want to ask on the ruby list instead of the rubyonrails list...

> Source Code :
>
> bash-3.2$ cat rubyXL.rb
> require 'rubyXL'
> workbook = RubyXL::Parser.parse("test.xlsx")
> workbook = RubyXL::Workbook.new
> sheet_Name = workbook.worksheets[0]
> puts sheet_Name
>
> ERROR
> rubyXL.rb
> /usr/local/Cellar/ruby/2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- nokogiri (LoadError)

Silly question: did you install nokogiri? That message above tells you
just what it cannot find.

> Installed rubyXL also :
>
> bash-3.2$ gem list | grep "XL"
> rubyXL (1.2.10)

Now try:

gem list | grep nokogiri

In looking at the rubyXL gem, the gemspec file does list nokogiri and a
few other things as run-time dependencies, but I don't quite understand
the syntax used in the .gemspec -- it *looks* like it should pull them
in, but neither gem install nor bundle install (if rubyXL is placed in a
Gemfile) are getting included.

If you look inside the rubyXL.gemspec file where rubyXL was installed,
you can find the other things it depends on and install those as well.

> Thanks ,
> Muthu Selvan SR

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/51c5fc35.4943320a.5916.ffffddfb%40mx.google.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate