Has anyone succeeded on installing Discourse (www.discourse.org) on Centos with Apache running Phusion Passenger? I’ve got so far but ended up with an error that seems to indicate my GEM_PATH environment variable not being properly set and not sure how to set that for Phusion Passenger.
I’ve asked this question on numerous forums including meta.discourse.org but no one seems to have a clue even though the procedure is supposedly covered in their documentation. However they seem to assume you’re a rails guru to begin with and thats one of the frameworks I haven’t used in years.
So anyway I decided to try here. If there is anyone who wants to give this a shot I have a link to my bash install scripts which I can ferret out. The install scripts I wrote myself and take the install procedure of installing all the requirements (dependencies) on Centos 6.5 from a clean install. I have done my best to make the installation “repeatable” in that the scripts check to see if a dependency is already installed (at least in most cases.)
Hope you don’t mind me piggy-back’ing on your thread. I recently tried to install discourse on Windows7 and also only got so far, and also had GEM_PATH errors on several repeated attempts
You might as well come along for the ride and we’ll see how much mileage we get Just out of curiosity did you use phusion passenger or did you run it straight from Apache? Someone suggested that it might be phusion passenger that might be giving me problems and to try running it without it but didn’t elaborate. That was a reply on a rails forum (not the discourse forum).
Some of the scripts call other scripts but they are also in the zip folder.
When I try to go to the web page I get this error:
It looks like Bundler could not find a gem. This is probably because your
application is being run under a different environment than it’s supposed to.
Please check the following:
Is this app supposed to be run as the discourse user?
Is this app being run on the correct Ruby interpreter? Below you will
see which Ruby interpreter Phusion Passenger attempted to use.
Are you using RVM? Please check whether the correct gemset is being used.
then I created as repository cloned Discourse to it, opened a shell and ran vagrant up ... a bunch ... vagrant ssh
cd’d to the vagrant directory and ran bundle install
That’s when I saw the “bundler” errors not finding GEM_PATH
I installed Ruby to C:\ because I wanted to be able to run it from command and edited the PATH
Ruby - rubyinstaller-1.9.3-p484.exe
Vagrant installed (default) to C:\HashiCorp\
Looking at
C:\HashiCorp\Vagrant\embedded\gems\bin\vagrant
I see
.....
# Useful variables
EMBEDDED_DIR="${DIR}/../embedded"
# Export gem paths so that we use the isolated gems.
export GEM_PATH="${EMBEDDED_DIR}/gems"
export GEM_HOME="${GEM_PATH}"
export GEMRC="${EMBEDDED_DIR}/etc/gemrc"
.....
# Set the path to the Ruby executable
RUBY_EXECUTABLE="${EMBEDDED_DIR}/bin/ruby"
I’m thinking my mistake was where I installed Ruby to but I haven’t messed around with it more yet.
Im surprised you having issues if you using vagrant as thats supposed to clone their development environment exactly as a VM. At least thats how I understand vagrant from reading the literature but haven’t used it myself.
I finally buckled down with resolve to get this working.
I know I:
deleted the github local repository and used clone again
reinstalled vagrant but this time to c:\vagrant instead of the default
*Discourse looks for c:\vagrant instead of c:\hashicorp\vagrant ??
Plus I did so many other things I don’t remember them all or in what order I tried things
Ok, interesting, I may try the Docker install when I get a chance, probably less bloated than vagrant, but interesting that works as an install option.