Bluehost India Web Hosting Help

Ruby on Rails: How-to install Redmine


    In this tutorial you will find the instructions needed for installing a ruby on rails application known as redmine.
    The version of redmine you will be installing is 2.1.4, It is one of the newer versions at the time of this article's creation.
    These steps have been broken down in to 13 easy to follow steps.

Getting started

    Firstly, this ruby on rails applications is considered outside the Scope of Technical Support.

    Secondly, before you can follow this helpdesk article, you are going to need SSH access. If you don't know how to get SSH access, please review these other helpdesk articles.

    Note: This article does expect you to understand basic command line tools, such as # vim

    1. Create rails_app folder and redmine folder within it then go inside that folder
    2.             # mkdir -p ~/rails_apps/redmine/
                  # cd ~/rails_apps/redmine/
    3. Download redmine 2.1.4, extract it and move the content out of it, then delete the files not being used.
    4.             # wget
                  # tar xvzf redmine-2.1.4.tar.gz 
                  # mv redmine-2.1.4/* ./
                  # rm -rf redmine-2.1.4*
    5. Move example files where they can be used
    6.             # cd config
                  # mv database.yml.example database.yml
                  # mv configuration.yml.example configuration.yml
    7. Creating the MySQL Database/User/Password
      1. Log in to your Bluehost India Control Panel
      2. Within the database section of that cPanel, find the 'MySQL® Databases' Icon.
      3. Create a database, a username, and a password
      4. Assign the user to the database. Full permissions.

    8. Modifying your database.yml file
    9.             # vim database.yml
      Modify these lines
                      adapter: mysql
                      database: redmine
                      host: localhost
                      username: root
                      encoding: utf8
    10. Updating the ~/rails_apps/redmine/public/.htaccess file
    11.             # cd ../public/
                  # pwd
      You should see something similar to this;
                  # vim .htaccess
      Add these lines
                     Options -MultiViews
                     PassengerResolveSymlinksInDocumentRoot on
                     #Set this to whatever environment you'll be running in
                     RailsEnv production
                     RackBaseURI /
                     SetEnv GEM_HOME /home1/examplec/ruby/gems
      Update this line to match the path for #pwd
                     SetEnv GEM_HOME /home#/user/ruby/gems
    12. Creating the subdomain
    13. The goal is to point the subdomain to the redmine folder, if you don't have one in mind, you can simply use redmine as your subdomain;
      1. Log in to your Bluehost India Control Panel
      2. Within the domain section of that cPanel, find the 'Subdomains' Icon.
      3. Choose one of your Domain Names from the drop-down list
      4. Then create a subdomain going to the document root of redmine

    14. Creating the symlink
    15. Now you need to delete the redmine folder, you can delete this from within the ~/public_html directory.
                  # rm -rf redmine
      Creating the symlink
                  # ln -s ~/rails_app/redmine/public redmine
    16. Updating your ~/.bashrc file
    17. Add these lines to the bottom of your ~/.bashrc file
                     export HPATH=$HOME
                     export GEM_HOME=$HPATH/ruby/gems
                     export GEM_PATH=$GEM_HOME:/lib64/ruby/gems/1.9.3
                     export GEM_CACHE=$GEM_HOME/cache
                     export PATH=$PATH:$HPATH/ruby/gems/bin
                     export PATH=$PATH:$HPATH/ruby/gems
      after which source your .bashrc file
                  # source ~/.bashrc
      You will then need to check your rails version
                  # rails -v
      You should get this message
                  Rails 3.2.13
      If you see this an error like so
                     Invalid gemspec in [/home#/user/ruby/gems/specifications/mail-2.4.4.gemspec]: invalid date format in specification: "2012-03-14 00:00:00.000000000Z"
                     Invalid gemspec in [/home#/user/ruby/gems/specifications/tilt-1.3.3.gemspec]: invalid date format in specification: "2011-08-25 00:00:00.000000000Z"
      Open the file from the error message, in this case /home#/user/ruby/gems/specifications/mail-2.4.4.gemspec modify this line
            = %q{2012-03-14 00:00:00.000000000Z}
      Change it to
            = %q{2012-03-14}
      That should correct that error message. This easy to run command is also viable.
                  # find $HOME/ruby/gems/specifications -name \*.gemspec | xargs sed -i "s/\ 00:00:00.000000000Z//"
    18. Running bundle install
    19.             # cd ~/rails_apps/redmine/
                  # bundle install
                  # rake generate_session_store
      the # rake generate_session_store is strictly related to redmine, some other applications may use it
      After running the rake if you get this error
                     Invalid gemspec in [/home#/user/ruby/gems/specifications/jquery-rails-2.0.3.gemspec]: invalid date format in specification: "2012-08-16 00:00:00.000000000Z"
      Again open that file /home#/user/ruby/gems/specifications/jquery-rails-2.0.3.gemspec and fix the date, if you don't know how to do that read above about 10 lines.
                  # bundle install
    20. Running generate_session_store or generate_secret_token
    21.             # rake generate_session_store
      If you get an error saying that command is deprecated, run this command instead;
                  # rake generate_secret_token
    22. publishing the site
    23.             # rake db:migrate RAILS_ENV=production
  • Common errors
  •             # rails generate controller First list
                   /home4/lorentzo/ruby/gems/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See for a list of available runtimes. (ExecJS::RuntimeUnavailable)
                   from /home#/user/ruby/gems/gems/execjs-1.4.0/lib/execjs.rb:5
                   from /home#/user/ruby/gems/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `require'
                   from /home#/user/ruby/gems/gems/coffee-script-2.2.0/lib/coffee_script.rb:1
                   from /home#/user/ruby/gems/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `require'
                   from /home#/user/ruby/gems/gems/coffee-script-2.2.0/lib/coffee-script.rb:1
                   from /home#/user/ruby/gems/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `require'
                   from /home#/user/ruby/gems/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1
                   from /home#/user/ruby/gems/gems/bundler-1.2.2/lib/bundler/runtime.rb:68:in `require'
                   from /home#/user/ruby/gems/gems/bundler-1.2.2/lib/bundler/runtime.rb:68:in `require'
                   from /home#/user/ruby/gems/gems/bundler-1.2.2/lib/bundler/runtime.rb:66:in `each'
                   from /home#/user/ruby/gems/gems/bundler-1.2.2/lib/bundler/runtime.rb:66:in `require'
                   from /home#/user/ruby/gems/gems/bundler-1.2.2/lib/bundler/runtime.rb:55:in `each'
                   from /home#/user/ruby/gems/gems/bundler-1.2.2/lib/bundler/runtime.rb:55:in `require'
                   from /home#/user/ruby/gems/gems/bundler-1.2.2/lib/bundler.rb:128:in `require'
                   from /home#/user/rails_apps/first/config/application.rb:7
                   from /home#/user/ruby/gems/gems/railties-3.2.9/lib/rails/commands.rb:24:in `require'
                   from /home#/user/ruby/gems/gems/railties-3.2.9/lib/rails/commands.rb:24
                   from script/rails:6:in `require'
                   from script/rails:6
  • Solution
  •             # gem install therubyracer
    then run
                # bundle install
Knowledgebase Article 122,982 views bookmark tags: redmine ruby

Was this resource helpful?

Did this resolve your issue?

Please add any other comments or suggestions about this content:

Recommended Help Content

Ruby on Rails application generates a 500 - Premature end of script error

When I attempt to execute my Ruby on Rails application I receive "500- Premature end of script."

Ruby on Rails, Gems

What Ruby on Rails version and Gems are installed?

Ruby on Rails 404 Errors

My Ruby on Rails installation keeps displaying a '404 Not Found' error.

Related Help Content

Ruby on Rails Setup

How do I setup Ruby on Rails?

Ruby Gems Installation

How do I install my own Ruby Gems?

VPS or Dedicated - Installing and using RoR with Passenger

This article will explain how to use RoR through passenger on a VPS or Dedicated hosting account

Rails Troubleshooting

Rails Troubleshooting!

Installing Application using Marketplace

How to install a program using MOJO Marketplace.

Path to Ruby

What is the path to Ruby?

Install WordPress using Marketplace

We provide a program which makes it very easy to install third party scripts to your hosting account. If you want your website to have a WordPress blog, you can use MOJO Marketplace to install WordPress.

How To Install A New WordPress Theme - Manual Theme Installation

Install Themes These steps will help you install and select a WordPress theme for your blog. Inside the WordPress Dashboard, select the Add New Themes link in the Appearance Menu. You can search for