Last updated October 13, 2010 04:10, by telegardian
Feedicon  

Setting Up your Development Environment

If you are interested in developing or testing Telegard/2 from source code checkouts, you must have a working environment setup. Completing these steps will prepare your computer to work with the source code.

Requirements

  • Linux Operating System (2.6.30 kernel or later recommended)
  • Bazaar VCS
  • Java JDK 1.6.22 or later
  • JRuby 1.5.3 or later
  • Required Ruby Gems

Recommended

Selecting a Linux Distribution

If you are new to Linux, selecting a distribution that fits your skill level can be a daunting task at best. Distrowatch.com is a great starting point. Most of the developers of this project use Ubuntu 10.04 or higher (or some variant such as LinxMint). This is recommended as the Bazaar VCS software is available as package (apt-get install bzr).

Preparing the Toolkit

It is recommended to maintain a self-contained development toolkit by downloading all the necessary components, rather than rely on the package manager provided by the Linux or BSD distro. The developers of Telegard are constantly keeping the tools updated to the latest versions, so keeping your toolkit up to date is crucial to ensure compatibility with the latest code releases. Create a master directory to store the development runtime. sudo mkdir -p /opt/devel/'java' It is preferred if you change the permissions on this file to your local user. sudo chown -R myuser: /opt/devel. You should never need to run anything as root from here out.

Install Bazaar

If you are running a recent Ubuntu based distro:

 apt-get install bzr

Otherwise, visit the Bazaar homepage for instructions on how to install the latest version.

Getting a JDK

Java Developer Kit is recommended. A standard JRE should work fine as well. This project tests against the official Java release and OpenJDK implementations.

Getting JRuby

Download the latest version of JRuby in tar.gz format from http://jruby.org Unpack the files into your master directory:

 cd /opt/devel/java
 tar -xzvf path_to_jruby_tarfile

Create a symlink

 ln -s /opt/devel/java/jruby-1.5.3 /opt/devel/java/jruby

Setting up the Shell

You must now set the environment variables. This can be done several ways. If you are not concerned about these versions of the toolkit conflicting with other installs of a JRE or JRuby interpretter you can add the environment to your local user. If this is a concern, then you should create a separate script to be sourced manually each time you wish to use this toolset. Add the following lines to either your /home/myuser/.bashrc file, or create a separate bash file with the same contents:

  JAVA_HOME=/opt/devel/jre
  export JAVA_HOME
 
  JDK_HOME=$JAVA_HOME
  export JDK_HOME
 JRUBY_HOME=/opt/devel/java/jruby
 export JRUBY_HOME
 
 PATH=$JRUBY_HOME/bin:$JAVA_HOME/bin:$PATH
 export PATH

If using .bashrc, each time you login or open a terminal running the bash shell, you should be able to access the tools directly in the path. If loading the environment by hand, you should run something like source /home/myuser/tgenv.sh' to load the vars (or whatever file you saved this to). To test if things are working:

 echo $JRUBY_HOME
 echo $JAVA_HOME

These should return the correct pathnames. Additionally, you can further validate by issuing:

 java -version ; jruby -v

Installing Required Ruby Gems

Telegard uses a minimum of add-on Ruby Gems. Most of the code is written using JRuby native libs or supplied JAR files. To install the required GEMS:

 jgem install bcrypt-ruby sequel

If you plan to build the API RDOC files, you'll need the rdoc template

 jgem install allison

Checking out the source code

Once your environment is ready, you can now download the source code from Launchpad:

 bzr co lp:telegard

Building the RDOCS

From the main checkout directory, run

 rake rdocs
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close