0

I get the following error:

no such file to load -- soap4r

But I have already done a gem install soap4r...multiple times to make sure.

Why am I getting this error and what can I do to fix it?

no such file to load -- soap4r
c:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
c:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
Satchel
  • 16,414
  • 23
  • 106
  • 192
  • Offtopic hint: most people seem to have moved on to Savon (http://savon.rubiii.com/) now. – Mark Thomas Nov 09 '10 at 00:12
  • 1
    Didn't you ask this question several months ago? http://stackoverflow.com/questions/3572433/no-such-file-to-load-soap4r-why – Mark Thomas Nov 09 '10 at 00:17
  • yes, but the gem we're using the author insists on using soap4r – Satchel Nov 09 '10 at 07:32
  • Do you have it listed as a config.gem? What happens when you `require "soap4r"` explicitly in your code? – Mark Thomas Nov 09 '10 at 14:21
  • 1
    Actually, if I recall correctly, you require 'soap/rpc/driver' or whatever module directly, not 'soap4r'. But it's been a few years since I've used it. – Mark Thomas Nov 09 '10 at 15:45
  • ah, if that's the case, then that would be the source of the problem....it's in a gem from a third party so I need to look into this... – Satchel Nov 14 '10 at 00:13

1 Answers1

0

I had the same problem in a Rails application when I included the soap4r inside the config block in environment.rb.

I got rid of the error when I moved it to the top of the file, before the initializer block. This is what I have:

gem 'soap4r'
require 'soap/wsdlDriver'

This, inside the initializer block, gave me errors:

config.gem 'soap4r'
user589473
  • 97
  • 3