Just Host Web Hosting Help
Ruby on Rails: How-to install Redmine
Summary
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
- Create rails_app folder and redmine folder within it then go inside that folder
- Download redmine 2.1.4, extract it and move the content out of it, then delete the files not being used.
- Move example files where they can be used
- Creating the MySQL Database/User/Password
- Log in to your Just Host Control Panel
- Within the database section of that cPanel, find the 'MySQL® Databases' Icon.
- Create a database, a username, and a password
- Assign the user to the database. Full permissions.
# mkdir -p ~/rails_apps/redmine/
# cd ~/rails_apps/redmine/
# wget http://rubyforge.org/frs/download.php/76589/redmine-2.1.4.tar.gz
# tar xvzf redmine-2.1.4.tar.gz
# mv redmine-2.1.4/* ./
# rm -rf redmine-2.1.4*
# cd config
# mv database.yml.example database.yml
# mv configuration.yml.example configuration.yml
# vim database.yml
Modify these lines
production:
adapter: mysql
database: redmine
host: localhost
username: root
password:
encoding: utf8
# cd ../public/
# pwd
You should see something similar to this;
/home#/user/rails_apps/redmine/public
# 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
- Log in to your Just Host Control Panel
- Within the domain section of that cPanel, find the 'Subdomains' Icon.
- Choose one of your Domain Names from the drop-down list
- Then create a subdomain going to the document root of redmine
# rm -rf redmine
Creating the symlink
# ln -s ~/rails_app/redmine/public redmine
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
s.date = %q{2012-03-14 00:00:00.000000000Z}
Change it to
s.date = %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//"
# 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
# rake generate_session_store
If you get an error saying that command is deprecated, run this command instead;
# rake generate_secret_token
# rake db:migrate RAILS_ENV=production
# 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 https://github.com/sstephenson/execjs 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
# gem install therubyracer
then run
# bundle install
Recommended Help Content
When I attempt to execute my Ruby on Rails application I receive "500- Premature end of script."
What Ruby on Rails version and Gems are installed?
My Ruby on Rails installation keeps displaying a '404 Not Found' error.
Related Help Content
How do I setup Ruby on Rails?
How do I install my own Ruby Gems?
This article will explain how to use RoR through passenger on a VPS or Dedicated hosting account
How to install a program using MOJO 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 WordPres
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

54,130 views
bookmark
share
E-mail
Twitter
Google Bookmarks
Facebook
MySpace
Digg
Reddit
Delicious
LinkedIn
StumbleUpon
tags: