views:

263

answers:

1

I have installed the ruby-net-ldap gem version 0.0.4 on my OS X (Snow Leopard) system. When I include the line...

config.gem('ruby-net-ldap')

in environment.rb, my tests won't run and I get this error...

Missing these required gems:
  ruby-net-ldap  

You're running:
  ruby 1.8.6.0 at /usr/local/bin/ruby
  rubygems 1.3.5 at /Users/ethan/.gem/ruby/1.8, /usr/local/lib/ruby/gems/1.8

Run `rake gems:install` to install the missing gems.

But the gem is definitely installed...

$ gem list -l | grep ldap
ruby-net-ldap (0.0.4)

My other gems are loading fine and presenting no problems...

  config.gem('mislav-will_paginate', :lib => 'will_paginate')
  config.gem('haml')
  config.gem('prawn')
  config.gem('thoughtbot-shoulda', :lib => 'shoulda/rails')
  config.gem('faker')
  config.gem('binarylogic-searchlogic', :lib => 'searchlogic')
  config.gem('fastercsv')

With the gem installed I am able to do LDAP queries in the Rails console, so it seems to be working sort of, just causing all the tests to error out.

Anyone seen this before?

+2  A: 

Is rake running in the same Ruby environment as gem? Did you specify the correct lib directory?

config.gem 'ruby-net-ldap', :version => '0.0.4', :lib => 'net/ldap'
James A. Rosen
Thanks, that was it.
Ethan