mkristian / dm-ldap-adapter

ldap-adapter for datamapper
MIT License
19 stars 3 forks source link

The dm-ldap-adapter gem is not found #3

Closed abhas closed 13 years ago

abhas commented 13 years ago

I am trying to run a simple piece of code to test out dm-ldap-adapter. However, I continue to get this error when I execute the code.

 /usr/local/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:53:in `require': no such file to load -- dm-ldap-adapter (LoadError)
    from /usr/local/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:53:in `require'
    from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/dm-core-1.0.2/lib/dm-core/adapters.rb:163:in `load_adapter'
    from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/dm-core-1.0.2/lib/dm-core/adapters.rb:133:in `adapter_class'
    from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/dm-core-1.0.2/lib/dm-core/adapters.rb:13:in `new'
    from /usr/local/ruby/lib/ruby/gems/1.9.1/gems/dm-core-1.0.2/lib/dm-core.rb:266:in `setup'
    from index.rb:9:in `<main>'

What could that I am doing wrong?

-abhas.

abhas commented 13 years ago

By the way, line 9 in index.rb reads as follows:

 DataMapper.setup(:default, {
               :adapter => 'ldap',
               :host => 'localhost',
               :port => '389',
               :base => "ou=people,dc=abhas,dc=in",
               :username => "cn=admin,dc=abhas,dc=in",
               :password => "password"
             })

I tried changing this to:

  DataMapper.setup(:ldap, {
               :adapter  => 'ldap',
               :host => 'localhost',
               :port => '389',
               :base => "dc=abhas,dc=in",
               :facade => :ruby_ldap,
               :bind_name => "cn=admin,dc=abhas,dc=in",
               :password => "password"
 })

but this too does not help.

abhas commented 13 years ago

Hi!

Really looking forward to your response...

TIA, Abhas.

mkristian commented 13 years ago

sorry for my late responds - I was offline for week or so.

the first error looks like the gem is missing in ruby-1.9.1 - what does "ruby -S gem list" show ?

I deleted the index.rb file - did you find that inside the gem ?

does it work maybe with ruby1.8.x - I do have some problems with me ruby1.9.1 setup right now.

mkristian commented 13 years ago

i pushed a fix for ruby1.9.x and will push a new gem once I run all the specs . . .

abhas commented 13 years ago

Hi Kristian! Thanks a lot for your response...

ruby -S gem list does show dm-ldap-adapter (0.4.2). I don't have ruby1.8.x on my machine any more. I'll check out the code from github and compile the gem manually and see if that helps. Will revert back to you about this.

abhas commented 13 years ago

Looks like the gem spec file is missing. Can you commit that so that I can try compiling the gem at my end?

mkristian commented 13 years ago

just pushed a gemspec file, hope it works. otherwise "rake package" should build the gem inside the pkg directory - needs hoe

mkristian commented 13 years ago

I think the ruby 1.9.x issue is finally solved. no more rake - see README-bundler.md