开发者

Why would the Net::LDAP gem prevent tests from running?

开发者 https://www.devze.com 2022-12-10 19:22 出处:网络
I have installed the ruby-net-ldap gem version 0.0.4 on my OS X (Snow Leopard) system. When I i开发者_开发百科nclude the line...

I have installed the ruby-net-ldap gem version 0.0.4 on my OS X (Snow Leopard) system. When I i开发者_开发百科nclude 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?


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'
0

精彩评论

暂无评论...
验证码 换一张
取 消