Skip to content

Instantly share code, notes, and snippets.

@ilpeste
Created February 25, 2011 16:37
Show Gist options
  • Save ilpeste/844047 to your computer and use it in GitHub Desktop.
Save ilpeste/844047 to your computer and use it in GitHub Desktop.
This is the code I've used in order to compile the gem "net-ldap" in branch master from https://github.com/RoryO/ruby-net-ldap . If you use `gem install "net-ldap`, you will install the v0.1.1 version which don't supports Ruby 1.9.2 . When the developer
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment