On 2 Aug 2009, at 21:13, doug livesey wrote:

> Hi -- I've got a class called SF::SOAP that gets defined at /lib/ 
> wsdl/sandbox/defaultDriver.rb
> It is defined like:
>
>   module SF
>     class SOAP
>       # ...
>     end
>   end
>
> How do I include this in my Rails app so that I can (for instance)  
> call SF::SOAP.new without getting an unintitialised constant (for  
> SF) error?
> I've tried direct requires, adding to the config.load_paths in the  
> environment files, adding to the $: array, all to no avail.
> I did something similar years ago, but I'm damn'ed if I can remember  
> how, so any help would be very gratefully received.


I usually either require it at the end of config/environment.rb or  
create a "requires.rb" in config/initializers and require it in there.  
Or my more recent method is to create a file for it in lib/ (as lib/ 
*.rb is all autorequired as of 2.something) so lib/sf_soap.rb which  
requires wsdl/sandbox/defaultDriver.rb.

C
---
Caius Durling
[email protected]
+44 (0) 7960 268 100
http://caius.name/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"NWRUG" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nwrug-members?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to