Installing Ruby/ActiveLdap on Ubuntu Dapper 6.06 LTS or Feisty 7.04
- Installing Ruby on Rails, RubyGems, and ActiveLdap on Dapper via apt-get is pretty well impossible. On Feisty, Ruby and RubyGems can be installed with apt-get, but the version of Ruby/ActiveLdap is very old (0.7.4).
Read more on why you don't want to use the packaging system to install Rails.
(2007-08-21) The following instructions worked for me:
- Install slapd and db4.2-util:
sudo apt-get install slapd db4.2-util
-
During install, you will be asked to provide a password. With this password you can administer the example database that is automatically created. The dn for this administrator is:
cn=admin,dc=nodomain
- Install the OpenLDAP development libraries, needed to compile ruby-ldap later on.
sudo apt-get install libldap2-dev
- Most likely, you want ssl compiled into ruby...
sudo apt-get install libssl-dev
- Install Ruby.
Check Ruby for the latest version.
VERSION="1.8.6" # adapt to your needs
sudo apt-get install build-essential
sudo apt-get install zlib1g-dev # we really need this
wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-$VERSION.tar.gz
tar zxvf ruby-$VERSION.tar.gz
cd ruby-$VERSION
./configure
make
make test
sudo make install
ruby -v # to see the installed version
- Install RubyGems.
Check RubyForge for the latest version.
VERSION="0.9.4" # adapt to your needs
RFID="20989" # adapt to your needs
wget http://rubyforge.org/frs/download.php/$RFID/rubygems-$VERSION.tgz
tar zxvf rubygems-$VERSION.tgz
cd rubygems-$VERSION
sudo ruby setup.rb
gem -v # to see the installed version
- Install Ruby/LDAP. It's not a gem yet. Check SourceForge for the latest version.
VERSION="0.9.7" # adapt to your needs
wget http://downloads.sourceforge.net/ruby-ldap/ruby-ldap-$VERSION.tar.gz
tar zxvf ruby-ldap-$VERSION.tar.gz
cd ruby-ldap-$VERSION
ruby extconf.rb --with-openldap2
make
sudo make install
- Install ActiveLdap via the ruby-activeldap gem.
sudo gem install -y ruby-activeldap
The '-y' tells gem to also install dependencies. If the command fails, due to a timeout, just try it again. Eventually, it will work.
Download
install-ruby-activeldap.tgz, a script that installs OpenLDAP, Ruby, RubyGems, Ruby/LDAP and Ruby/ActiveLdap, almost unattended.
Use at your own risk.