Bluehost 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
- 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 Bluehost 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.
- Modifying your database.yml file
- Updating the ~/rails_apps/redmine/public/.htaccess file
- Creating the subdomain 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;
- Log in to your Bluehost 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
- Creating the symlink Now you need to delete the redmine folder, you can delete this from within the ~/public_html directory.
- Updating your ~/.bashrc file Add these lines to the bottom of your ~/.bashrc file
- Running bundle install
- Running generate_session_store or generate_secret_token
- publishing the site
- Common errors
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
# 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.ymlModify these lines
production: adapter: mysql database: redmine host: localhost username: root password: encoding: utf8
# cd ../public/ # pwdYou should see something similar to this;
/home#/user/rails_apps/redmine/public
# vim .htaccessAdd 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/gemsUpdate this line to match the path for #pwd
SetEnv GEM_HOME /home#/user/ruby/gems
# rm -rf redmineCreating 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/gemsafter which source your .bashrc file
# source ~/.bashrcYou will then need to check your rails version
# rails -vYou should get this message
Rails 3.2.13If 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_storethe # 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_storeIf 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 therubyracerthen run
# bundle install
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