Install omdb.org on your local computer

To install omdb.org on your local computer, you need to meet certain conditions. Right now omdb.org runs only on rails 1.1.6. You need a number of gems to start this application. You can find the names and versions of the required gems in the file source:/trunk/REQUIRED_GEMS.

You can install the gems like that:

 sudo gem install --include-dependencies --version 0.11.14 ferret

To run a Rails 1.1.6 application, you need Ruby 1.8.5. Rails 1.1.6 will not work with Ruby 1.8.6. To downgrade Ruby on MacOS, see http://blog.omdb-beta.org/2007/7/6/rails-1-1-6-and-ruby-1-8-6

Download omdb.org

Download the latest omdb.org version via subversion, like that:

  svn co http://svn.omdb-beta.org/trunk omdb
  cd omdb

You need to create the required databases (omdb_dev, omdb_test and omdb_prod) and create a database.yml and a backgroundrb.yml. You can find examples for both config files in the trunk source:/trunk/config/database.yml.sample and source:/trunk/config/backgroundrb.yml.sample.

Add data to your database

You can use the fixtures to fill your database, but most probably that will not give you enough data to really use omdb. The fixtures are just meant for the testcases and will not add enough data to really enjoy omdb.

To load the fixtures, simply type:

  rake db:schema:load
  rake db:fixtures:load

But you can also fetch the latest dump of the production data. Get them via http://www.omdb.org/downloads/omdb_prod.dump.sql.bz2 (>600meg) (DISABLED AT THE MOMENT 2009-03-08). To install it, type:

  bzip2 -d -c omdb_prod.dump.sql.bz2 | mysql -u rails -p omdb_dev

Setup the required infrastructure

After your database has been filled, you need to setup the ferret index structure. omdb uses a backgroundrb ferret indexing server that will work with two indexes, one online index for searches and a offline index for updates. These indexes will be synced after each bulk indexing. See source:/trunk/lib/workers/ferret_server_worker.rb for more information. To setup the structure, type:

  rake omdb:setup

Create the anonymous user

You need to create the anonymous user, if you downloaded the omdb database dump. The users table of the dump will be empty, but you need at least the anonymous user to start using omdb. Do so by typing:

  ./script/console
 >> User.create_anonymous

Create a user

You might want to add an admin account to the system. You can add one by starting the script/console and typing:

  ./script/console
  >> my_user = User.create :login => 'my-user', :email => 'some@email.com', 
                           :password => 'my_password', :password_confirmation => 'my_password'
  >> my_user.is_admin = true
  >> my_user.save

Start the server

You can now start omdb. You need to start the backgroundrb process as well, so the ferret indexing server is up and running.

  memcached # optional
  ./script/backgroundrb/start -d
  ./script/server

Please also consider to visit on of our link partners: