in development, geek stuff, linux

Blacklight Installation


This post wouldn’t exist (and my experience with Blacklight) if I didn’t get the help from Anusha Ranganathan‘s notes and some 3+ other posts that I mentioned as needed.

Installation instructions for installing Blacklight

Install the following pakages

$ sudo apt-get update
$ sudo apt-get install openssh-server  #so you can ssh to your machine
$ sudo apt-get install links2 #a command line browser handy for testing
$ sudo apt-get install build-essential
$ sudo apt-get install git-core
$ sudo apt-get install curl
$ sudo apt-get install mysql-server
    --- set a root password for mysql 
$ sudo apt-get install sqlite3
$ sudo apt-get install libsqlite3-dev
$ sudo apt-get install libxml2 libxml2-dev
$ sudo apt-get install libxslt1-dev
$ sudo apt-get install libcurl3-dev
$ sudo apt-get install libreadline5 libreadline5-dev
$ sudo apt-get install libncurses5 libncurses5-dev

Install Java

$ sudo apt-get install sun-java6-jdk

If you see the error “Package sun-java6-jdk has no installation candidate” then you need to add a new source to the list of repositories.

Edit the file /etc/apt/sources.list and add the line “deb lucid partner”
$ sudo vim /etc/apt/sources.list

Search a line with “#deb lucid partner” uncomment it or add the line “deb lucid partner”

Update the package index, as we have just added a new source and install java again. It should work this time.

$ sudo apt-get update   
$ sudo apt-get install sun-java6-jdk

Accept the two license agreements

Install rvm

I followed instructions from

I have written the basics of what I did here.

$ bash < <( curl )
$ vim .bashrc

Comment the line [ -z “$PS1” ] && return and add the if statement as below

#[ -z "$PS1" ] && return
if [[ -n "$PS1" ]]; then
    [ -z "$PS1" ] && return
    # Some code here... e.g.
    export HISTCONTROL=ignoreboth

Add the following line in the end of the file. IT HAS TO BE THE LAST LINE

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"  # This loads RVM into a shell session.

$ vim .profile

Add the following line in the end of the file. IT HAS TO BE THE LAST LINE

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"  # This loads RVM into a shell session.

Test rvm – To test rvm, open a new shell or logout and login again.

$ type rvm | head -n1

Should get rvm is a function


Install ruby using rvm.

Before that I need to install a few packages for running ruby on Ubuntu

$ rvm package install readline
$ rvm package install iconv
$ rvm package install curl
$ rvm package install openssl

$ rvm install 1.8.7 -C "--with-openssl-dir=$HOME/.rvm/usr --with-readline-dir=$HOME/.rvm/usr --with-iconv-dir=$HOME/.rvm/usr --with-curl-dir=$HOME/.rvm/usr" --reconfigure –force

The below where rubygems was taken from:

$ rvm install 1.8.7
$ rvm use 1.8.7 --default
$ rvm gemset create rails_2_3_5

When you run “gem list”, you should see nothing!

$ gem install rails -v=2.3.5
$ rvm use 1.8.7@rails_2_3_5 --default

Install rubygems

$ rvm use 1.8.7
$ rvm gemdir

Should list the gemdir placed within the .rvm dir in the local users home folder
~/.rvm/gems/ruby-1.8.7-p302 (In my case it is /home/ingestadmin/.rvm/gems/ruby-1.8.7-p302)

$ wget
$ tar -zxvf rubygems-1.5.2.tgz
$ cd rubygems-1.5.2/
$ ruby setup.rb

$ cd ~
$ gem update --system

Install libssl-dev

$  sudo apt-get install libssl-dev
# Not sure if the following is needed

$ cd .rvm/src/ruby-1.8.7-p302/ext/openssl/
$ ruby extconf.rb
$ make
$ make install

Install bundler

$ gem install bundler

Then continue the installation from the Blacklight project, but don’t use sudo, so…

$ gem -v
$ gem install rubygems-update
$ update_rubygems
$ gem sources -l

It should show:

If doesn’t, add them like this:

gem sources -a
gem sources -a
gem sources -a
gem sources -a

$ gem install sqlite3-ruby
$ gem install mysql

If there is a problem with the gems

(following instructions from

do this:

$ gem install rubygems-update -v='1.4.2'
$ gem uninstall rubygems-update -v='1.5.2'
$ update_rubygems

if complains about missing gems, use then:

$ rake gems:install

“If you get the error ‘could not find table “searches”‘ it’s b/c you need to run

$ rake db:migrate

Write a Comment