don't you need to require rubygems as well when running from a script?
On Sun, 30 Jun 2013 11:30:21 +0800, Muthu Selvan <[email protected]> wrote:
*sudo gem install rubyXL* ---------> *EMPTY RESULT * * * *So installed rubyXL with the below command ...* * * Fetching: rubyXL-1.2.10.gem (100%) Successfully installed rubyXL-1.2.10 1 gem installed *Ruby version :* *$ which ruby* /Users/mselv2/.rvm/rubies/jruby-1.7.4/bin/ruby *Error while running ex.rb after installed the rubyXL* $ ruby ex.rb NameError: uninitialized constant RubyXL const_missing at org/jruby/RubyModule.java:2631 (root) at /Users/mselv2/ruby_Code/rubyXL.rb:3 require at org/jruby/RubyKernel.java:1054 (root) at /Users/mselv2/.rvm/rubies/jruby-1.7.4/lib/ruby/shared/rubygems/custom_require.rb:1 (root) at ex.rb:1 Please let me should i do any thing and let me know if you required additional information to solve the issue ? Thanks , Muthu Selvan SR On Saturday, 29 June 2013 11:50:55 UTC-7, Norbert Melzer wrote:Am Fri, 28 Jun 2013 17:44:29 -0700 (PDT) schrieb Muthu Selvan <[email protected] <javascript:>>: > > Hi , > > I am trying to read excel sheet from Ruby so i have installed > RubyXL ( sudo gem install rubyXL ) . > > After installed successfully , I am running with the below source > code , but its giving error > > mselv2m1:ruby_Code mselv2$ ruby ex.rb > * ./rubyXL.rb:3: uninitialized constant RubyXL (NameError) * > from ex.rb:1:in `require' > from ex.rb:1 > > > *//Source Code : * > cat ex.rb > require 'rubyXL' Your example works very well for me, or at least I don't get any error messages when I run that oneliner. But I took a quick look over at rubygems.org, and had seen, that there are some dependencies as development deps only, which I think that should be full-deps (nokogiri for XML and rubyzip for unzipping that docx stuff), but also I don't think that this is really the problem… Please check first, if rubyXL is installed correctly: $ gem list | grep rubyXL If not, try installing again and post the full output of the install command to the list, also please tell us if you are using rvm, rbversion or similar tools or the default ruby of your system package management system. In any case tell us the version of ruby and ruby gems you are using. > 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/op.wzg5l5lhrqdk4p%40administrators-macbook-pro.local. For more options, visit https://groups.google.com/groups/opt_out.

