Content
Bluehost & OpenProject
Added by G.J. van Trier over 10 years ago
I would like to share my experience installing OpenProject on a subdomain hosted at Bluehost. This is my first experience with Ruby on Rails & SSH, I am pretty sure my struggles will be of help to someone else in the future. I am skipping most of the steps that are provided in the other install instructions available on openproject.org
(I am using OS X 10.9)
First of all you need to enable SSH and login through terminal. There is plenty of information regarding this so you’d think this first step would be the easiest. Yet I managed to get stuck here already, since the default terminal settings in Lion will provide you with lots of errors regarding ASCII & UTF-8 settings while logging in and trying to install gems.
In order to solve this I’ve changed some settings regarding the local environment in terminalpreferences>settings->advanced
In addition to that (but I didn’t confirm if this was necessary) I also changed the settings on the domain itself by adding the following lines to ~/.bashrc
export LANGUAGE=en_US.UTF-8 export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 export LC_TYPE=en_US.UTF-8
This solved these issues for me and it allowed me to finish ‘bundle install’ without any problems. Yet in order to use bundle I first had to install a new version using ‘gem install builder’ since the default version provided by Bluehost was way to low. After installing the latest version ‘bundle install’ still was using the old version and I had to add the following lines to ~/.bashrc again in order for me to use the local installed gems.
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
This might all seem basics for the more experienced among us but for me this combination of settings got me stuck for quite some time. But finally I managed to install OpenProject in my ~/rails_apps/openproject folder using
bundle install bundle exec rake generate_secret_token bundle exec rake db:create:all bundle exec rake db:migrate RAILS_ENV=production bundle exec rake db:seed RAILS_ENV=production bundle exec rake assets:precompile
There is no need to start the server, since we want to run the application on a subdomain we are going to use apache and passenger. Luckily Bluehost already has both installed and running. All that’s left now is to create the subdomain from your control panel, delete the folder linked to the subdomain and create a symlink pointing ~/rails_apps/openproject/public to the folder that you just deleted.
Now when you enter your subdomain you will see some files and the css & js folders, the final step in order to access your OpenProject installation is to add a .htaccess file to the ~/rails_apps/openproject/public folder. The following lines should be in this .htaccess file, SetEnv should point to your Bluehost-account specific folder structure. (Without the first line I get a 500-error, this line is probably not needed for others but I guess I fucked up some settings somewhere along the road)
RewriteCond %{ENV:REDIRECT_STATUS} ^$ Options -MultiViews PassengerResolveSymlinksIndocumentRoot on RailsEnv production RackBaseURI / SetEnv GEM_HOME /home/bluehostaccount/ruby/gems
Replies (4)
Thank you for this post! I tried to install OP 4.0 on Bluehost following mostly the instructions from https://www.openproject.org/download/manual-installation/, but even if the installation steps have been finally completed without errors (or at least I haven’t seen any), when I access my OP instance I get the following errors:
/home3/my_account/rails_apps/openproject/config/application.rb:128: syntax error, unexpected tLPAREN_ARG, expecting keyword_do_LAMBDA or tLAMBEG config.assets.precompile.unshift -> (path) { ^ /home3/my_account/rails_apps/openproject/config/application.rb:128: syntax error, unexpected tLAMBEG, expecting keyword_end /home3/my_account/rails_apps/openproject/config/application.rb:130: syntax error, unexpected ‘}’, expecting keyword_end /home3/my_account/rails_apps/openproject/config/application.rb:168: syntax error, unexpected keyword_do_block, expecting keyword_end /home3/my_account/rails_apps/openproject/config/application.rb:183: syntax error, unexpected keyword_end, expecting $end
I was curious about the OP version that you managed to install - by the date of this post, and the steps you describe, I assume it’s 3.0, but want to make sure…
I am new to rails apps, so I’m kinda stuck now.
Thanks a lot!
Alex
I used OpenProject 3.0.8, I wish I could help you with those errors, but I can’t.
Next Christmas I might attempt to install the latest version myself. I hope you’ve figured out this problem by then. ;)
Thank you for the fast reply!
I think I’m going to start this from scratch tomorrow morning, after I have a good sleep. I’ll keep you posted if what I find.
Thanks,
Alex
Hi again,
I started from scratch today, and got to the same point :(. I started another thread here as I think it’s a more general topic.
Alex