Skip to content

Installation: Clone the git repo & install gems

Mark Bussey edited this page Jul 10, 2014 · 28 revisions

Notes

The Git repository contains the HydraDAM-specific code. The Gems contain other people's code that we use in HydraDAM. We are standing on the shoulders of giants here.

Steps

  1. Clone the Git repository and change directories by entering the following commands in the terminal window.

    cd /opt  
    git clone git://github.com/curationexperts/hydradam.git ${HYDRA_NAME}  
    cd $HYDRA_NAME  
  2. Confirm that the correct versions of Ruby and RubyGems are installed.

    1. Enter the command ruby -v in the terminal window. This should return 2.0.0.
    2. Enter the command gem -v. This should return 2.0.0 or above.
      If not, see the troubleshooting tips for instructions on how to update your RubyGems version and/or uninstall the old Ruby version.
  3. Install bundler, rails, rake, and passenger as root. Note: you may see messages about rdoc or ri or other conflicts, which prompt you to overwrite - answer yes. For example:

rdoc's executable "rdoc" conflicts with /usr/bin/rdoc Overwrite the executable? [yN] y```

  1. Open a root session by entering the command sudo su.

  2. Install bundler by entering the command gem install bundler --no-rdoc --no-ri.

  3. Install rails by entering the command gem install rails --no-rdoc --no-ri.

  4. Install rake by entering the command gem install rake --no-rdoc --no-ri.

  5. Install passenger & dependencies by entering the commands:

    gem install daemon_controller  
    gem install passenger  
  6. Install resque-pool by entering the command gem install resque-pool.

  7. Type exit to exit the root session and return to your regular shell.

  8. Change permissions on the gem directory by entering the command sudo chown -R $USER:$USER /usr/local/lib/ruby/gems/2.0.0/.

  9. Install project dependencies for deployment with bundler by entering the command bundle --deployment. Note: This may take a while, but you should see the message "Your bundle is complete" at the end.

The final output will look similar to this (with the ... indicating system generated code that has been intentionally left out of these instructions):

[your_username@ip hydradam]$ bundle --deployment
Fetching source index from https://rubygems.org/
Fetching git://github.com/harai/kaminari.git
remote: Counting objects: 3179, done.
remote: Compressing objects: 100% (1579/1579), done.
remote: Total 3179 (delta 1395), reused 3179 (delta 1395)
...
Installing uglifier (2.3.2)
Installing unicorn (4.7.0)
Your bundle is complete!
It was installed into ./vendor/bundle
Post-install message from haml:

HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
your application:

* Support for Ruby 1.8.6 dropped
* Support for Rails 2 dropped
* Sass filter now always outputs <style> tags
* Data attributes are now hyphenated, not underscored
* html2haml utility moved to the html2haml gem
* Textile and Maruku filters moved to the haml-contrib gem

For more info see:

http://rubydoc.info/github/haml/haml/file/CHANGELOG.md

Verification Steps

  1. Stay in your project home directory (/opt/$HYDRA_NAME) and enter the command bundle exec rails console production. You will see an interactive ruby (irb) prompt.
  2. Enter the command Sufia::VERSION. This should return version 3.5.0 or greater.
  3. Type exit to return to your regular shell prompt.

Next Step

Proceed to Install and Configure Apache & Passenger or return to the Overview page.

Clone this wiki locally