[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ruby-net-ldap

imdwalrus

2/24/2008 1:57:00 AM

I'm running ruby 1.8.6 on Windows. I've installed the ruby-net-ldap
0.0.4 gem. When I require 'net/ldap' I get nothing. All calls to
ruby-net-ldap methods fail. I've used this gem successfully in
another project and I
just can't figure out what I'm doing wrong now.

I ran the following tests in the project where it's failing:

C:> gem list
...
ruby-net-ldap (0.0.4)
...

C:> path
...;c:/RoR/Ruby/bin;... <and no other ruby libs>

irb>$:.each {|dir| puts dir }
...
c:/RoR/Ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/bin
c:/RoR/Ruby/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/bin
c:/RoR/Ruby/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib
...

irb> require "net/ldap"
[ ]

So the gem is there, the directory is in the load path, but the
require statement isn't finding it. I confirmed that c:/RoR/Ruby/lib/
ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap.rb exists. The
only differences I can see between the instance that works and this
one is that the former uses ruby 1.8.5 and Rails 1.2 and the latter
uses ruby 1.8.6 and Rails 2.0.2. I've also tried this under Parallels
on my Macbook using Ruby 1.8.6 and Rails 2.0.2 and it fails there
too.

I don't know what else to check. Can someone enlighten me, please?

-- Mike

3 Answers

Glen Holcomb

2/25/2008 5:16:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

On Sat, Feb 23, 2008 at 6:56 PM, imdwalrus <mike.rood@comcast.net> wrote:

> I'm running ruby 1.8.6 on Windows. I've installed the ruby-net-ldap
> 0.0.4 gem. When I require 'net/ldap' I get nothing. All calls to
> ruby-net-ldap methods fail. I've used this gem successfully in
> another project and I
> just can't figure out what I'm doing wrong now.
>
> I ran the following tests in the project where it's failing:
>
> C:> gem list
> ...
> ruby-net-ldap (0.0.4)
> ...
>
> C:> path
> ...;c:/RoR/Ruby/bin;... <and no other ruby libs>
>
> irb>$:.each {|dir| puts dir }
> ...
> c:/RoR/Ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/bin
> c:/RoR/Ruby/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/bin
> c:/RoR/Ruby/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib
> ...
>
> irb> require "net/ldap"
> [ ]
>
> So the gem is there, the directory is in the load path, but the
> require statement isn't finding it. I confirmed that c:/RoR/Ruby/lib/
> ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap.rb exists. The
> only differences I can see between the instance that works and this
> one is that the former uses ruby 1.8.5 and Rails 1.2 and the latter
> uses ruby 1.8.6 and Rails 2.0.2. I've also tried this under Parallels
> on my Macbook using Ruby 1.8.6 and Rails 2.0.2 and it fails there
> too.
>
> I don't know what else to check. Can someone enlighten me, please?
>
> -- Mike
>
>
require 'rubygems'
require 'net/ldap'

perhaps?


--
"Hey brother Christian with your high and mighty errand, Your actions speak
so loud, I can't hear a word you're saying."

-Greg Graffin (Bad Religion)

mcf1986@gmail.com

3/20/2008 1:16:00 PM

0

On Feb 24, 1:56 am, imdwalrus <mike.r...@comcast.net> wrote:
> I'm running ruby 1.8.6 on Windows.  I've installed the ruby-net-ldap
> 0.0.4 gem.  When I require 'net/ldap' I get nothing.  All calls to
> ruby-net-ldap methods fail.  I've used this gem successfully in
> another project and I
> just can't figure out what I'm doing wrong now.
>
> I ran the following tests in the project where it's failing:
>
> C:> gem list
> ..
> ruby-net-ldap (0.0.4)
> ..
>
> C:> path
> ..;c:/RoR/Ruby/bin;...     <and no other ruby libs>
>
> irb>$:.each {|dir| puts dir }
> ..
> c:/RoR/Ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/bin
> c:/RoR/Ruby/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/bin
> c:/RoR/Ruby/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib
> ..
>
> irb> require "net/ldap"
> [  ]
>
> So the gem is there, the directory is in the load path, but the
> require statement isn't finding it.  I confirmed that c:/RoR/Ruby/lib/
> ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap.rb exists.  The
> only differences I can see between the instance that works and this
> one is that the former uses ruby 1.8.5 and Rails 1.2 and the latter
> uses ruby 1.8.6 and Rails 2.0.2.  I've also tried this under Parallels
> on my Macbook using Ruby 1.8.6 and Rails 2.0.2 and it fails there
> too.
>
> I don't know what else to check.  Can someone enlighten me, please?
>
> -- Mike

I have the same problem from upgrading Ruby 1.8.6, I can't see why
this is broken. Going to implement OpenID in the mean time. Did you
manage to fix this issue?

Matt

Mike Rood

11/14/2008 1:51:00 AM

0

Glen Holcomb wrote:
> On Sat, Feb 23, 2008 at 6:56 PM, imdwalrus <mike.rood@comcast.net>
> wrote:
>
>> ruby-net-ldap (0.0.4)
>> ...
>> on my Macbook using Ruby 1.8.6 and Rails 2.0.2 and it fails there
>> too.
>>
>> I don't know what else to check. Can someone enlighten me, please?
>>
>> -- Mike
>>
>>
> require 'rubygems'
> require 'net/ldap'
>
> perhaps?
>
>
> --
> "Hey brother Christian with your high and mighty errand, Your actions
> speak
> so loud, I can't hear a word you're saying."
>
> -Greg Graffin (Bad Religion)

It looks like I never followed up after Glen gave me the answer. Adding
require 'rubygems'
solved the problem. Thanks for your help, Glen. I'm sorry I took so
long to thank you.

-- Mike
--
Posted via http://www.ruby-....