SAP RFC Access from Ruby – nwrfc

nwrfc is a Ruby Gem to allow you to access an SAP ABAP system via RFC, using the NW RFC SDK library and Ruby-FFI to access the library.

The project is hosted at and the Gem is hosted on Rubygems (, so you can install the latest version with:

gem install nwrfc

Be sure to check out the wiki on the GitHub page for some examples.

5 Responses to “SAP RFC Access from Ruby – nwrfc”

  1. sushi says:


    i’m using your nwrfc (0.0.5) with metasploit and i get this error:

    [x] This module requires the NW RFC SDK ruby wrapper ( from Martin Ceronio.
    /opt/metasploit/msf3/lib/gemcache/ruby/1.9.1/arch/linux64/nokogiri-1.5.2/lib/nwrfc/nwrfclib.rb:12: warning: already initialized constant RUBY_VERSION_18
    /opt/metasploit/msf3/lib/gemcache/ruby/1.9.1/arch/linux64/nokogiri-1.5.2/lib/nwrfc/nwrfclib.rb:78: warning: already initialized constant Cutf8_to_utf16le
    /opt/metasploit/msf3/lib/gemcache/ruby/1.9.1/arch/linux64/nokogiri-1.5.2/lib/nwrfc/nwrfclib.rb:79: warning: already initialized constant Cutf16le_to_utf8

    Can you help me? It’s very important.

    Thank you.

  2. sushi says:


    I’ve made a mess with library.

    Now it’s ok.

    Thank you

  3. sapadmin says:

    How did u solve it?

  4. Ruby Lou says:

    hi, could you please send me the NW RFC SDK? Thanks a lot!

  5. Veda Gangatkar says:

    Hi ,
    I am facing issue when I tried to run the test
    “C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/ffi-1.9.25-x64-mingw32/lib/ffi/library.rb:145:in `block in ffi_lib’: Could not open library ‘sapnwrfc’: The specified module could
    Could not open library ‘sapnwrfc.dll’: The specified module could not be found.”
    I have added the path of sapnwrfc,dll to the system environment variables but no luck.
    Can you plz let me know what I am missing?

Leave a Reply