Developer:Spacebook

From myExperiment

Jump to: navigation, search


Contents

Installing

20080204: email from Don:

Tony,

OK, a few things that should get you up and running!  I've included the lines
in Ubuntu style.


Install Graphviz
-------------------------------------------------------------------------------

You need to install the graphviz package, which on Ubuntu can be done with:

  $ sudo apt-get install graphviz

This is needed in order to generate the workflow preview images that are shown
on the website for the Taverna workflows.


Install the gems
-------------------------------------------------------------------------------

For the following, if you are asked which version of the gem to install, choose
the latest "ruby" version (not win32):

I know you've installed a bunch of gems already, but I've included this list
here with all the version numbers so that you can compare it to our latest
fresh installation if you suspect anything amiss:

  $ sudo gem install -v 1.2.3  -y rails
  $ sudo gem install -v 1.0.0  -y BlueCloth
  $ sudo gem install -v 2.1.2  -y builder
  $ sudo gem install -v 1.0.8  -y contacts
  $ sudo gem install -v 1.1.3  -y mongrel
  $ sudo gem install -v 1.0.5  -y mongrel_cluster
  $ sudo gem install -v 2.7    -y mysql
  $ sudo gem install -v 2.0.0  -y rmagick   <------- see below if/when this fails
  $ sudo gem install -v 3.0.4  -y RedCloth
  $ sudo gem install -v 1.4.0  -y hoe
  $ sudo gem install -v 0.9.1  -y rubyzip
  $ sudo gem install -v 0.1    -y openid_login_generator
  $ sudo gem install -v 1.3.0  -y needle
  $ sudo gem install -v 1.15   -y mime-types
  $ sudo gem install -v 0.1.0  -y dsl_accessor
  $ sudo gem install -v 1.1.0  -y net-sftp
  $ sudo gem install -v 1.0.11 -y xml-simple


Install the myExperiment codebase
-------------------------------------------------------------------------------

You'll need to update your working copy of myexperiment (to at least revision
1204) to successfully create the database tables.

  $ svn checkout http://myexperiment.rubyforge.org/svn/trunk myexperiment
  $ cd myexperiment

All the following commands are done from the root of the myexperiment package.


Configuration
-------------------------------------------------------------------------------

The file "install.txt" describes three configuration files you'll need to copy
into place.

Currently you need a valid SMTP because the server sends out confirmation
emails (that need to be responded to) when you sign up for new accounts.

When it comes to configuration the database, you could specify different
databases for development mode and production mode but I tend to run with them
as the same.  You'll also need to create an (empty) database of the name you
specify, but rails will do the rest.


Preparing the database
-------------------------------------------------------------------------------

To setup the database tables, it should all happen when you:

  $ rake db:migrate        <--- also see below

This produces a fair amount of output, but the last line will tell you if there
are any errors in it.  I'm confident that this will work for you  :) 


Running it
-------------------------------------------------------------------------------

After all that, you should be able to run it with this:

  $ ruby script/server --environment=production

There are two main operating modes that a rails application can be set to:
development mode and production mode.  Production mode is *much* faster!


Hopefully that should get you up and running, and please don't hesitate to
contact us for more!

Cheers,
Don.

20080205:TL: the rmagick gem failed to install. This seems to be a common problem on Ubuntu with the solution being to compile and install it yourself, I'm afraid. Fortunately someone else has hit the problem and come up with simple to follow instructions (otherwise I would never have got there): see this page at Urban Puddle.

20080205:TL: rake failed to work also. Fixed by downgrading from rake 0.8.1 to 0.7.3.

This turned out to a conflict between the engines plugin and later versions of rake. We've applied a patch to myExperiment that solves this, so you can use the latest version of rake. DonCruickshank 16:23, 26th July 2008 (UTC)

20080428:JB: also require the Taverna client gem (contact Jits or Don for more info).

Customising

20080204 [Jits]:

Hi Tony,

---
...
> Jits: where would you suggest I start in modifying the 'look' of the site?

This, of course, depends on how much customisation you need (eg: text, graphics, look and feel, and so on).

To change the graphics used (eg: logo), go to this folder:
\public\images\

To change general look and feel, you can edit:
\public\stylesheets\styles.css (overall site styles)
\public\stylesheets\homepage.css (the styles for that front page you managed to load up)
\public\stylesheets\gadgets.css (the styles for the "gadgets" on the right hand side of the site)

This directory contains the main layout pieces of the site:
\app\views\layouts\

Within this layouts directory, the following file defines the overall layout of the site and contains 
the main tab nav you see at the top.
\app\views\layouts\application.rhtml

This directory contains the "gadgets" that are in the right hand side bar
\app\views\gadgets\

The codebase has gone through many changes over the course of the project and also many different 
refactorings. If you find anything confusing let me know. Some key things to look out for:
- "Networks" and "Groups" mean the exact same thing in the codebase, but to users we only ever use 
the term "Group".
- As above, but for "Blobs" and "Files" (the latter is what users see).

This file contains the majority of helper methods used within the views:
\app\helpers\application_helper.rb

An important method in the file above is "icon" which is the method we use wherever possible to get an 
icon in a view.

...

General

  1. When loading a new version of the codebase,
    1. - run 'rake db:migrate' from the myexperiment folder to pick up db changes
    2. - check the database.yml.pre and environment_private.rb.pre files in the ./config folder to see if any new config items have been added and then add them to your own database.yml and environment_private.rb files

To Find Out

  1. Overall structure of project
    1. how a Rails project hangs together
    2. what myExperiment does differently
    3. how information can be handed from one 'tab' to another
  2. myExperiment model
    1. ie, data model
  3. Queries tab
    1. want to add new tab, 'Queries'
    2. similar to Workflows tab
    3. users store queries and metadata associated with them
  4. Widgets tab
    1. new tab which will host OpenSocial widgets
  5. ActiveSAC
    1. need to add access method for SACs
    2. possibly derived from ActiveRDF (codebase)
Personal tools