Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

132 lines (100 sloc) 7.313 kb
MyExperiment Developers' Guide
------------------------------
Contents
--------
1. Introduction
2. Installing on Debian/Ubuntu
2.1 Installation System Specification
2.2 Installation Instructions
1. Introduction
---------------
This guide is designed to assist developers in getting myExperiment up and running on their own server, including all the Ruby-on-Rails infrastructure. Below is comprehensive instructions on how to install MyExperiment on a Debian/Ubuntu system. It is mostly applicable to all Linux systems. In the future we hope to add similar instructions for Windows systems.
2. Installing on Debian/Ubuntu
------------------------------
2.1 Installation System Specification
-------------------------------------
* Pentium D 2.8GHz
* 1GB RAM
* 250GB Hard Disk
* Debian Lenny (Linux Kernel 2.6.22-3-686 #1 SMP)
* Apache 2.2.8
* MySQL Version 14.12, Distribution 5.0.51a
* Java version 1.5.0
* gij (GNU libgcj) version 4.3.1 20080309 (prerelease)
2.2 Installation Instructions
-----------------------------
As Root user:
* Use Debian's package installer (i.e. apt-get install) to install the following packages:
root> apt-get install make ruby libzlib-ruby rdoc irb rubygems
* Check to see which version of rubygems has installed:
root> gem -v
* This needs to be version 0.9.4 or earlier or ruby-openid gem may not work and you will not be able to log into myExperiment on your server using OpenID. The myExperiment team is currently working on a fix so that ruby-openid works on myExperiment with later versions of rubygems.
* To install an earlier version than you package manager will install first remove rubygems:
root> apt-get remove rubygems
* Then you need to get the tgz file from http://rubyforge.org/frs/?group_id=126 and untar it somewhere. Inside the rubygems directory run the following comamnds:
root> ruby setup.rb
root> update_rubygems
* This should hopefully install the version of rubygems you require. If it does not this may be because you have a rubygems-update gem installed use gem uninstall to remove this and try the above two commands again.
* Install Rails GEM version 1.2.6
root> gem install rails --version=1.2.6
* Then install the following Debian packages:
root> apt-get install libapache2-mod-fcgid libfcgi-ruby1.8 libmysql-ruby ruby1.8-dev build-essential
* MyExperiment requires the RMagick GEM. This can cause some problems on Debian.
* To resolve this first make sure the following Debian packages are uninstalled:
root> apt-get remove --purge librmagick-ruby-doc librmagick-ruby1.8
* Then install the following Debian packages:
root> apt-get install graphicsmagick imagemagick librmagick-ruby1.8 libmagick9-dev
* myExperiment also requires Graphviz because it has dot, which is required to draw workflow images:
root> apt-get install graphviz
* Now the rest of the GEMs required by MyExperiment can be installed:
root> gem install builder cgi_multipart_eof_fix daemons dsl_accessor fastthread gem_plugin hoe json mime-types mongrel mongrel_cluster
needle net-sftp net-ssh openid_login_generator RedCloth ruby-yadis solr-ruby xml-simple rubyzip libxml-ruby oauth ruby-hmac --include-dependencies
* During this process you may be requested to select one of a set of versions to install, choose the latest version suffixed with "(ruby)"
* If you have problems install these gems all in one go, try installing them in smaller subsets or one at a time if needs be.
* ruby-openid needs version 1.1.4 to work properly so that needs to be installed separately with the following command (You may need to gem uninstall version 2.1.2 first):
root> gem uninstall ruby-openid --version=2.1.2
root> gem install ruby-openid --version=1.1.4
* rmagick needs version 1.15.14 to work properly so also needs to be installed separately with the following command:
root> gem install rmagick --version=1.15.14
* OAuth was originally designed for Rails 2 and therefore some of the code in the GEM will not work in Rails 1.2.6. To fixed this go to GEM_LIBRARY/oauth-0.2.4/lib/oauth/request_proxy/action_controller_request.rb and replace the contents of def request_params with:
unless @request_parameters
@request_parameters = request.request_parameters.dup
request.symbolized_path_parameters.keys.each do |k|
@request_parameters.delete k.to_s
end if request.respond_to? :symbolized_path_parameters
end
@request_parameters
* Unfortunately, the Taverna GEM cannot be installed from a remote source, therefore it is included in the code-base which now needs to be downloaded. The myExperiment code-base is stored within an SVN, so first SVN needs to be installed.
root> apt-get install subversion
* Now the system environment is ready for the MyExperimemt code base but first SVN needs to be installed so that the codebase can be downloaded.
root> apt-get install subversion
* Before downloading the code base make sure that the terminal is in the correct directory. for this example the directory /var/rails/ will be used.
* Now use the SVN to checkout the code base
root> svn checkout svn://rubyforge.org/var/svn/myexperiment
* To ensure that the downloaded file have the correct ownership run the following chown command over the downloaded SVN. (Where username is your username):
root> chown -R username:www-data /var/rails/
* Now the Taverna GEM can be installed by using the following command from /trunk/vendor/gems/taverna/ directory:
root> gem install taverna-0.5.0.gem
* Before going any further, check to see which version of ruby has been installed:
root> ruby --version
* If this is < v1.86 you will need to compile from source using http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p286.tar.gz.
* Now load up a mysql shell and create three databases as follows:
mysql> create database m2_development;
mysql> create database m2_production;
mysql> create database m2_test;
* After exiting mysql switch user back to your username and change directory to /var/rails/myexperiment/trunk/config/ In the directory:
* Copy database.yml.pre to database.yml.
* Edit database.yml adding the appropriate passwords and usernames for the three databases.
* Copy environment_private.rb.pre to environment_private.rb
* Edit environment_private.rb. In particular to set the correct details for SMTP to allow emails to be sent by MyExperiment. Also make sure SOLR_ENABLE is set to true so that data in your MyExperiment can be indexed and searched over by users.
* Copy captcha.yml.pre to captcha.yml.
* Edit captcha.yml to set it to the words you want to use in your captchas.
* Change directory back to /var/rails/myexperiment/trunk and run the following command as root:
root> apt-get install rake
* Now execute the following commands just as a user:
user> rake db:migrate
user> rake solr:start
user> ./resolr.sh
* '''./resolr.sh''' may take some time to run (i.e. in the 5 minutes range) as it indexes the database to make searching quicker. After this has run the webserver can be started with the following command:
user> ruby script/server
* This should start a mongrel webserver running on port 3000 of the installation system. To see if this has worked load up a web browser and go to http://localhost:3000
Jump to Line
Something went wrong with that request. Please try again.