Here is what I learn from other resource (see bottom of post)

After deciding to move my host to HostGator.com, I was very excited that HG support for Ruby on Rails and Python. Because I really want to improve the management of my company, I decided to install Redmine on my host. Here is what I have done. If you want to follow my path, it’s ok but I don’t guarantee anything. I just want to write this to make me remember if I forget someday.
Redmine is one of the most powerful of open source code project management software (I said open source code, not just open source). So many recomendation come from forums I join in. I have tried so many project management software that is based on PHP (before I host in HostGator), but none of them can satisfy me. So many reasons, such as no integration with Version Control, bad user interface, too complicated to use, and so on.
Before you continue to read, make sure you have already enabled the SSH acces. You can do it by entering your account in https://gbclient.hostgator.com/ and then View Hosting Package. On your ready-to-redmined domain, click Enable SSH Access.
Redmine use database, one of supported DBMS is MySql, that I use here. So, prepare your database (I did it via cPanel) and user for your redmine. I hope you already know how to do it.
First of all, open a terminal window to your HostGator-account using SSH (with PuTTY for example) to perform the following commands:
- Edit bash_profile
- If the following environment variable does not exist, add it:
- Log off, and then log in again to make it active.
- If the following folder does not exist, create ~/rails_apps/:
- Check your Ruby and Rails version according to Redmine Install Wiki
- Go to rails directory
- Checkout trunk of redmine and enter the directory
- Create database configuration by copying from the example
- Edit database config file
- You will open text editor of that file. Edit it according to your setting in production block.
- Save using Ctrl + O and exit using Ctrl + X. Continue with following command:
- Because you install redmine not in http area, you need to create a soft link to redmine public folder. For example, you have folder team in public_html, or just subdomain team that use the folder.
- Open environment file
- Make sure the following line is included in the file.
- Continue with the following command
- Now you can point your web browser to redmine, for example:
- Log on as admin with password admin (default from redmine). Create new Administrator user, and disable the admin account (recommended).
- Install necessary gems, to make sure Redmine and its plugin can find it. Check your gem pathgem environment
- Same with step 1, edit your bash_profile and add these lines
- Same with step 11, add these following lines to the beginning of the ~/rails_apps/redmine/config/environment.rb file.
- Install plugins you want to install to Install the plugins you want into ~/rails_apps/redmine/vendor/plugins.
- Finish, you may use your redmine.
nano ~/.bash_profile
export RAILS_ENV=production
mkdir ~/rails_apps
ruby -v rails -v
cd ~/rails_apps/
svn co http://redmine.rubyforge.org/svn/trunk redmine cd ~/rails_apps/redmine/
cp config/database.yml.example config/database.yml
nano config/database.yml
production: adapter: mysql database: your_redmine host: localhost username: your_redmine password: your_redmine encoding: utf8
rake config/initializers/session_store.rb rake db:migrate rake redmine:load_default_data
ln -s /home/your-account/rails_apps/redmine/public /home/your-account/public_html/team
nano ~/rails_apps/redmine/config/environment.rb
ENV['RAILS_ENV'] = 'production' ENV['RAILS_RELATIVE_URL_ROOT'] = "/redmine" # Not necessary if you plan to access your redmine via subdomain.
cd ~/rails_apps/redmine/tmp/ rails -d mysql --with-dispatchers tmpredmine cp -i tmpredmine/public/dispatch.* ~/rails_apps/redmine/public/ rm -rf tmpredmine
http://team.yourdomain.com (depending on your configuration)
export GEM_HOME=$HOME/ruby/gems export GEM_PATH=$GEM_HOME:/usr/lib/ruby/gems/1.8 export GEM_CACHE=$GEM_HOME/cache export PATH=$PATH:$GEM_HOME/bin
$:.push("/home/your-account/ruby/gems")
ENV['GEM_PATH'] = '/home/your_account/ruby/gems:/usr/lib/ruby/gems/1.8'
I try to not download from subversion, and download the release package then upload manually, but I get an error while accessing my redmine. Maybe this link can help with it (I think it was because of folder and file permission),
After this, I plan to install Mercurial SCM, because HostGator also provide python. I will write the tutorial later. But I already succeed with it.
Source: Here
20 Comments
Trackbacks/Pingbacks
- 一些 Redmine 安装资料 « 我读 - [...] Redmine on HostGator Shared Hosting http://blog.haqqi.net/2010/12/installing-redmine-on-hostgator-shared-hosting/ [...]




Hi Haqqi,
First of all, thanks for providing a very good description of how to install Redmine on Hostgator account.
I also have a Shared Account with HostGator since Nov 2010, however my account came with Rails 2.3.8 and Redmine seems to not support this version, only 2.3.5.
I already talked to HostGator support and they cannot downgrade my version of Rails.
I’m wondering which version of Rails did you installed your environment?
thanks,
Luis
thank you for reading my tutorial. My hosting account (registered November 2010) came with Rails 2.3.8, and I don’t have any problem installing Redmine. I have read on the Redmine instruction that it must use Ruby 1.8.7 (exact version), but it said that “minimum” rails 2.3.5. So, 2.3.8 will work too, and I have proven that.
Now, I have Rails 3.0.3 on my account, but Redmine seems don’t give any problem. You can do Rails upgrade via SSH, using command:
gems install rails
Hope it will help you.
Update: i think this tutorial won’t work on Rails 3.0.3. You must install Rails 2.3.5 or 2.3.8 and use following command whenever you need rails command:
rails _2.3.5_
Hi
I’m following you’re Redmine tutorial for installing Redmine on Hostgator and have got stuck on the following command:
rails -d mysql –with-dispatchers tmpredmine
It just gives me the usage options of rails. So is there something obvious I’m getting wrong?
If it helps I have got 0.9 of Redmine as Hostgator can’t install I18n 0.4.2 on my shared hosting server and I have Railes 3.0.3!
Thanks
Hi, thank you for reading my blog.
Yes, I got same problem too, I think it was because of Rails 3.0.3. You should install rails. 2.3.5 or 2.3.8 to do that command with pattern:
rails _2.3.8_ -d blablabla
about i18n, you must ask hostgator support to reconfig your rails directory to be your local ruby. So, you will be able to uninstall i18n 0.5 and reinstall the 0.4.2.
Hope it will help you.
Thanks for the reply. Hostgator have installed that version of i18n now but I am still having problems so have a few questions:
1) In step 15 I can run the command as rails _2.3.8_ -d blablabla, just goes to the next command prompt with no errors, but I haven’t installed any other version of Rails. Does this sound like it’s worked?
2) Should I be seeing anything in the Rails option on my cPanel?
3) Do I need to create a sub domain for the link created in step 12?
4) In my ‘dev’ folder which I’m using for Redmine I have two HTML files, 400 & 500, 3 dispatch files, fav icon and folders. Is that correct?
5) After following all of the steps I visit dev.inewsapps.co.uk and the browser can’t find the page. Is there something obvious I haven’t done e.g. ran the command in 12 but not created a sub domain? Or is it because I have Rails 3.0.3? If I need a previous version how do I install it?
Sorry for all the questions but I would really like to get this working!
Hei, watch out. I can Jan 1st, 2010, 10:18pm GMT+7, i can login into your domain with default admin user and password. It works, right?
1. you should check whether other rails version installed or not using command “gems list rails”.
2. cPanel currently doesn’t support rails 3.0.3. I have asked the HG support. I think you should not rely on cpanel information.
3. yes, i prefer you should use subdomain (and never publish it, because you just use it in your team).
4. i never check the dev folder. the folder you need to publish your site only “public” folder in rails_app/redmine
5. I have checked the domain, and able to login with default admin user and password. I think you should change it immedietly.
Haqqi
Thanks for the help. When I posted the last message it wasn’t working so I don’t know what happened there but I have disabled the default account now. Next step, get the email configured!
On the SCM side, have you written the blog post yet as I would like to use SCM, Redmine for source control with Apple’s Xcode?
Nice to hear that. I use Mercurial as SCM in my HostGator account. I haven’t write the tutorial yet. Maybe as soon as possible.
For email configuration, I think you can just copy email.yml.example to redmine/config/email.yml. Just read redmine documentation, it is clear enough.
Thanks for tutorial. I wonder how did you setup Redmine email notification on Hostgator I cannot succeed with it.((((( It always give me error or connection refused 2.
what send email method you use? i tried gmail smtp and always give error. so I use local smtp which address is “mail.yourdomain.com” port 465 and using mail address that is setup from cpanel to be used as the smtp user.
The thing is that most tutorials are lacking email.yml setup.
I have a choice:
1) I can use gmail
2) I can use normal smtp 25
3) I can use secure ssl smtp 465
I wonder how is you email.yml looks like? Because you are on hostgator as well. Where did you use ‘ or “. This seems to be confusing.
Any method will be fine for me, but I would prefer not to use gmail.
By the way did you ask support to install additional gems apart from i18?
Thanks for response
ups, I remember that I got same problem with smtp, and I end up using sendmail method in email.yml. I have set it up with right setting, but it always give an error.
I forgot, but during the installation (after upgrading to rails 3), I ask so many question to support, to reinstall i18n and other..
But how does your email.yml look like now?
yes, support installed i18n for me by my request
Hi Haqqi
Thanks for your tutorial! I have everything running and set up!
But I have a small problem with hostgator, my account has Rails 2.3.5 Installed and I’m not able to upgrade.
Every time I run “gems install rails” I get kicked out of the shell…
I contacted the Support but they told me they will “eventually” upgraded when they suit it better…
Have you had similar problems?
Regards
Vlax
i never get that problems. maybe you should ask for support. I did it too, and now I run redmine with no problem.
I was trying to install it following your tutorial and a few more and finally I couldn’t get it working.
But I’ve found CandyCane, a port of Redmine to CakePHP.
https://github.com/yandod/candycane
It’s still under development, but works very well (excluding some minor bugs, like removing a project).
wow, great! maybe i will try the candy cane..!!
Hey Haqqi,
Thanks for these instructions. I had to so some additional things:
- Update Rubygems to 1.3.7: Run “gem update –system 1.3.7″
- run “rake generate_session_store” before step 11 (as described in the Redmine wiki)
- Install mysql gem: “gem install mysql”
With all that, the install seems to have gone well, however, I’m stuck at step 16. My website doesn’t seem to run at all. I just get an “500 internal server error” message.
If I check the ROR page in hostgator’s cpanel (http://yourwebsite.com:2082/frontend/x3/ror/index.html), it say that Redmine is “not running”. I can click on start, but it still won’t run. Any idea on how I can find out what went wrong?
Simon
Hey Simon. I think I had same problems before. My application run well before, but suddenly got 500 Internal Server Error. So I just ask HG support to fix it, and now it is okay. I think you should ask hostgator support too.