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'

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/bf838f1e-617c-4c94-8242-7e126391b894%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Muthu Selvan at Jun 29, 2013 at 5:23 pm
    Hi All

    I have tried my best to solve this issue but no luck for me ..

    Kindly help me to solve this issue , this is seem to be some environmental
    issue .

    Thanks ,
    Muthu Selvan SR
    On Friday, 28 June 2013 17:44:29 UTC-7, Muthu Selvan wrote:


    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'

    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/26618b8e-4b6b-4b30-84c2-54382639ec0d%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Norbert Melzer at Jun 29, 2013 at 6:51 pm

    Am Fri, 28 Jun 2013 17:44:29 -0700 (PDT) schrieb Muthu Selvan <pearl.selvan@gmail.com>:


    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

  • Muthu Selvan at Jun 30, 2013 at 3:30 am
    *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 <pearl....@gmail.com <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 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/806110a6-4d5a-4d74-8c45-8005a1ff29f7%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Simon Macneall at Jun 30, 2013 at 4:33 am
    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 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 <pearl....@gmail.com <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 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/op.wzg5l5lhrqdk4p%40administrators-macbook-pro.local.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Norbert Melzer at Jun 30, 2013 at 7:01 am
    2013/6/30 Muthu Selvan <pearl.selvan@gmail.com>
    *sudo gem install rubyXL* ---------> *EMPTY RESULT *
    This line makes me assume, that you use a system ruby and no version
    manager…
    *
    *
    *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
    … while this one tells me, that you manage ruby versions with RVM.

    You don't need `sudo` when using RVM, please try again installing rubyXL
    without sudo!

    --
    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/CA%2BbCVstPT-NnbPp%2BAXAGeTNSkgcUsw9m4DZXpVVN5kLtxpaucA%40mail.gmail.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Muthu Selvan at Jun 30, 2013 at 3:49 pm
    Please find the answer as in below ..

    *Norbert Melzer >>* What is RVM Version ?
    *Muthu Selvan >>* $ rvm version

    *rvm 1.20.13* (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal
    Papis [https://rvm.io/]


    *Norbert Melzer >>* Install rubyXL without sudo
    Muthu Selvan >> gem install rubyXL
    Fetching: rubyXL-1.2.10.gem (100%)
    Successfully installed rubyXL-1.2.10
    1 gem installed

    *ERROR :*
    *
    *
    *$ rvm use jruby
    *
    *Using /Users/mselv2/.rvm/gems/jruby-1.7.4
    *
    *
    *
    *
      cucumber features/java.feature
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in
    `report_activate_error': Could not find RubyGem cucumber (>= 0)
    (Gem::LoadError)
    from
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in
    `activate'
    from
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in
    `gem'
    from /usr/bin/cucumber:18

    *

    Please let me know is it any thing should i do more ?

    Thanks ,
    Muthu Selvan SR


    On Sunday, 30 June 2013 00:01:12 UTC-7, Norbert Melzer wrote:

    2013/6/30 Muthu Selvan <pearl....@gmail.com <javascript:>>
    *sudo gem install rubyXL* ---------> *EMPTY RESULT *
    This line makes me assume, that you use a system ruby and no version
    manager…
    *
    *
    *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
    … while this one tells me, that you manage ruby versions with RVM.

    You don't need `sudo` when using RVM, please try again installing rubyXL
    without sudo!
    --
    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/8be1ce98-97cb-4668-abb7-1fef7cc227a2%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Norbert Melzer at Jun 30, 2013 at 5:38 pm

    Am Sun, 30 Jun 2013 08:48:48 -0700 (PDT) schrieb Muthu Selvan <pearl.selvan@gmail.com>:

    *Norbert Melzer >>* Install rubyXL without sudo
    Muthu Selvan >> gem install rubyXL
    Fetching: rubyXL-1.2.10.gem (100%)
    Successfully installed rubyXL-1.2.10
    1 gem installed

    *ERROR :*
    *
    *
    *$ rvm use jruby
    *
    *Using /Users/mselv2/.rvm/gems/jruby-1.7.4
    *
    *
    *
    *
    cucumber features/java.feature
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in
    `report_activate_error': Could not find RubyGem cucumber (>= 0)
    (Gem::LoadError)
    from
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in
    `activate'
    from
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in
    `gem'
    from /usr/bin/cucumber:18
    Did I get that right? You are installing first and then switching over
    to jruby? You should do that the other way round… But since I don't
    have knowledge about jRuby I can't tell you anything about that
    specific problem you have there… Try switching over to jruby and THEN
    installing cucumber.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJun 29, '13 at 12:44a
activeJun 30, '13 at 5:38p
posts8
users3
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase