Here my procedure:
# Step 0: Add (temporary) the following gems to your application Gemfile
group :development, :test do
gem "hoe"
gem "rspec"
end
# ... and then ...
bundle install
# Step 1: Download the tarball from https://github.com/RoryO/ruby-net-ldap and untar it in vendor/gems/ruby-net-ldap folder
# Step 2: Go to the main folder of your Rails 3 application
cd vendor/gems/ruby-net-ldap
# Step 3: There's a bug with Psych parser with bundler 1.0.10. So add this line at the bottom of Rakefile (before require rubygems) and save the file:
# require 'psych'
# Step 4: Build the gem
rake clean
rake debug_gem | grep -v "(in " > `basename \`pwd\``.gemspec
rake build_manifest
rake gem
# Step 5: Add your shining homemade gem to your Gemfile
gem "net-ldap", :path => "vendor/gems/ruby-net-ldap/pkg/" , :require => 'net/ldap'
bundle install
Remember to change the gem to the original one when this will be available a new update version of “net-ldap” (>0.1.1).
