cancel
Showing results for 
Search instead for 
Did you mean: 

Ruby saprfc failed for me

Former Member
0 Kudos

Dear Experts,

I have tried to use saprfc to get data from SAP. However, when I just include the library like this:


require "SAP/Rfc"

it returns error like this:


C:\Documents and Settings\Cato_mis\My Documents\ruby_rfc>ruby test.rb
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems.rb:926:in `report_activate_error':
RubyGem version error: saprfc(0.37 not >= 0) (Gem::LoadError)
        from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems.rb:244:in `activate_de
p'
        from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems.rb:236:in `activate'
        from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems.rb:213:in `rescue in t
ry_activate'
        from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems.rb:210:in `try_activat
e'
        from <internal:gem_prelude>:218:in `try_activate'
        from <internal:lib/rubygems/custom_require>:32:in `rescue in require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from test.rb:1:in `<main>'

How can I solve this? Is saprfc does not support 1.9.2 version of Ruby?

Thanks.

Regards,

Cato

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member211904
Participant
0 Kudos

This forum does not seem to provide support for what you are doing. The SAP Rfc connector for Ruby is written by Piers Harding, a community member. Your best bet is to head over to http://raa.ruby-lang.org/project/saprfc/, the home of this connector, and see whether you can get support from Piers himself.

Alternatively, try looking into the newer sapnwrfc connector by Piers at http://raa.ruby-lang.org/project/sapnwrfc/, which is a wrapper around the new NW RFC SDK library, which you should be using anyway, rather than the old connector, because it is backward compatible anyway.

I am also working on a project to write a wrapper around the NW RFC SDK library using Ruby-FFI, which you can find here: https://github.com/mydoghasworms/nwrfc