Thanks Andy,

I tried the following and it worked

              # in config/init.rb
gem 'soap4r' # before dependency 'soapr4' is called
require 'config/dependencies'

and
# in config/dependencies.rb
dependeny 'soap4r', '1.5.8', require_as => 'soap/mapping' do
  require 'soap/rpc/driver'
end
# doesn't work without the require_as

then

thor merb:gems:install
# as expected, this adds soap4r and its dependency, httpclient to the local
gems repository

Great !

- Ahsan / highandwild

On Thu, Dec 18, 2008 at 11:27 PM, Andy Delcambre <[email protected]>wrote:

>
> On Thu, Dec 18, 2008 at 10:34 AM, Ahsan Ali <[email protected]> wrote:
> > Good stuff. Now I'm clear about the bundling part.
> >
> > Problem: Soap4r needs to be included using with: gem 'soap4r' to override
> > the soap4r that is distributed with ruby itself. The gem statement
> > "overrides the priority".
> >
> > dependency 'soap4r', '1.5.8' # doesn't work
> > # error is The file 'soap4r' was not found
> >
> > Any ideas ?
> >
> > Thanks,
> >
> > Ahsan
>
> The syntax for dependencies where the gem name is different than the
> file to require is with :require_as => in the options.
>
> So in case of soap4r you would do something like:
>
> dependency "soap4r", "1.5.8", :require_as => "soap"
>
> or
>
> dependency "soap4r", "1.5.8", :require_as => "soap/wsdlDriver"
>
> This technique can be used for any gem where the file to require is
> different, for example:
>
> dependency "net-ssh", :require_as => 'net/ssh'
>
>  - Andy Delcambre
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" 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/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to