Developer:WindowsInstallation

From myExperiment

Jump to: navigation, search

Installing myExperiment on Microsoft Windows

Guide written by Martin Chilvers (Edited by David Newman)


Contents


These installation instructions are for the Rails 1 version of myExperiment. We are working on instructions for the Rails 2 version.

Installation Test System Specification

  • Processor?
  • RAM?
  • Hard Disk Size?
  • Microsoft Windows XP Version 2002 Service Pack 3
  • Webserver?
  • Java version?


Installation Instructions

Install Ruby

Use the One-Click Ruby Installer

  • Make sure the "Enable RubyGems" option is checked when displayed
  • The installer includes useful packages like irb (interactive prompt), gems (packaging/deployment), rdoc (documentation) etc...


Install Rails version 1.2.6

Rails is the Ruby web-application framework that MyExperiment is written in

 gem install rails --version 1.2.6

This will pull down a bunch of other gems required by Rails


Install MySQL

Download from Here

  • I selected a "Complete" installation
  • Check "Configure the MySQL Server Now"
  • Uncheck "Register the MySQL Server Now"
  • Just for fun, choose the "Detailed Configuration"
    • Accept "Developer Machine"
    • Accept "Multifunctional Database"
    • Accept defaults for "InnoDB Tablespace" Settings
    • Accept "Decision Support (DSS)/OLAP" for number of concurrent users
    • Accept defaults to enable TCP/IP and strict mode
    • Accept default for character set
    • Check the "Include Bin Directory in Windows PATH"
    • Create a password for the root user
    • Check "Enable root access from remote machines" - just in case!


Install ImageMagick and RMagick (Ruby bindings)


Install Graphviz

  • Download from Here
  • Required because it has "dot" which is used to draw workflow images


Install Ruby Gems

The following Gems need to install with the following command. Multiple Gems can be installed with one command by adding the gem name to the end of the command.

 gem install <gem> 
 builder cgi_multipart_eof_fix daemons dsl_accessor gem_plugin hoe json mime-types 
 mongrel mongrel_cluster needle net-sftp openid_login_generator RedCloth ruby-yadis 
 solr_ruby xml-simple libxml-ruby oauth rubyzip openurl curb marc htmlentities

Hack OAuth

It was written for Railes 2 and needs to be hacked to work with Rails 1.2.6. Go to GEM_IBRARY/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


Checkout MyExperiment

 svn checkout -r 2844 svn://rubyforge.org/var/svn/myexperiment/trunk


Install the Taverna gem

 cd ...trunk/vendor/gems/taverna
 gem install taverna --local


Setup MySQL

In a MySQL shell do:

 create database m2_development;
 create database m2_production;
 create database m2_test;

Configure Rails to get to the databases:

 cd .../trunk/config
 cp database.yml.pre database.yml

Edit database.yml by adding your MySQL usernames and password where appropriate!


Configure the MyExperiment server

 cp default_settings.yml settings.yml
  • Edit settings.yml
    • set "solr_enable" to true
    • set the details of an SMTP server (when you register with MyExepriment it needs to send an e-mail to complete the confirmation process, so you will need this!) e.g:
smtp:
 :address:        "mail.myserver.mydomain"
 :port:           25,
 :domain:         "myserver.mydomain"
 :authentication: :login
 :user_name:      "your_username"
 :password:       "your_password"
cp captcha.yml.pre to captcha.yml
  • Edit captcha.yml to set the words to use in captchas.


Sync the databases

Turn off strict mode while creating the database tables(MyExperiment doesn't like it!)

  • edit your mysql server's ini file "...\MySQL\MySQL Server 5.0\my.ini"
  • comment out the following line (add a "#")
 sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
  • restart mysql server (I do it using the Windows Services admin tool)


Create the tables

The commands below create the appropriate tables, etc.

cd .../trunk
rake db:migrate

Turn strict mode back on

  • Edit your mysql server's ini file "...\MySQL\MySQL Server 5.0\my.ini"
  • Uncomment the line you commented out!
  • Restart MySQL server


Start solr

Remove use of "fork" which is unsupported on Windows

  • get the win32/process gems
 gem install windows-pr
 gem install win32-process
 cd ...\My Documents\Repositories\MyExperiment\trunk\vendor\plugins\acts_as_solr\lib\tasks
  • edit solr.rake
  • add require "win32/process"
  • Change "fork" to "Process.fork" (2 occurences)
  • Start the solr server
 rake solr:start


Start a webserver

 ruby script/server


Go to http://localhost:3000 to test the server is running

Personal tools