kiwiheretic — 2014-01-24T23:03:06-05:00 — #1
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.)
Would anyone like to help me look into this?
mittineague — 2014-01-24T23:16:45-05:00 — #2
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
I followed this
and then this
but no joy
kiwiheretic — 2014-01-25T01:33:43-05:00 — #3
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).
My install scripts can be downloaded here: http://www.mediafire.com/download/dx3t84dtkegkrhc/install%20scripts.zip
It is a zipped self-contained folder of files I use to try and install discourse on a clean install Centos 6.5.
To run the scripts I type in root shell:
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
- 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.
- If all of the above fails, try resetting your RVM gemsets:
-------- The exception is as follows: -------
Could not find rake-10.1.1 in any of the sources (Bundler::GemNotFound)
Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV and PASSENGER_ENV)
Ruby interpreter command
User and groups
uid=501(discourse) gid=502(discourse) groups=502(discourse),501(rvm) context=unconfined_u:system_r:httpd_t:s0
rvm_bin_path = /usr/local/rvm/bin
HOSTNAME = localhost.localdomain
GEM_HOME = /home/discourse/discourse/vendor/bundle/ruby/1.8
SHELL = /bin/bash
TERM = xterm
HISTSIZE = 1000
IRBRC = /usr/local/rvm/rubies/ruby-2.0.0-p353/.irbrc
QTDIR = /usr/lib64/qt-3.3
PASSENGER_DEBUG_DIR = /tmp/passenger.spawn-debug.XXXXnxxiJm
MY_RUBY_HOME = /usr/local/rvm/rubies/ruby-2.0.0-p353
QTINC = /usr/lib64/qt-3.3/include
USER = discourse
systemtype = Linux
rvm_path = /usr/local/rvm
rvm_prefix = /usr/local
MAIL = /var/spool/mail/discourse
PATH = /usr/local/rvm/gems/ruby-2.0.0-p353/bin:/usr/local/rvm/gems/ruby-2.0.0-p353@global/bin:/usr/local/rvm/rubies/ruby-2.0.0-p353/bin:/usr/lib64/qt-3.3/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/rvm/bin:/home/discourse/bin
PWD = /home/discourse/discourse
KDE_IS_PRELINKED = 1
LANG = C
KDEDIRS = /usr
systemarch = x86_64
systemversion = 6
SSH_ASKPASS = /usr/libexec/openssh/gnome-ssh-askpass
HISTCONTROL = ignoredups
rvm_version = 1.25.15 (stable)
HOME = /home/discourse
SHLVL = 2
LOGNAME = discourse
QTLIB = /usr/lib64/qt-3.3/lib
CVS_RSH = ssh
LESSOPEN = |/usr/bin/lesspipe.sh %s
systemname = CentOS
G_BROKEN_FILENAMES = 1
IN_PASSENGER = 1
PYTHONUNBUFFERED = 1
NODE_PATH = /opt/passenger/passenger-4.0.29/node_lib
RAILS_ENV = production
RACK_ENV = production
WSGI_ENV = production
NODE_ENV = production
PASSENGER_APP_ENV = production
SERVER_PROTOCOL = HTTP/1.1
SERVER_SOFTWARE = Apache/2.2.15 (CentOS)
DOCUMENT_ROOT = /home/discourse/discourse/public
SERVER_ADMIN = root@localhost
SERVER_NAME = 192.168.1.65
REMOTE_PORT = 46467
REMOTE_ADDR = 192.168.1.65
SERVER_PORT = 80
REQUEST_METHOD = GET
SERVER_ADDR = 192.168.1.65
REQUEST_URI = /
ORIGINALGEM_PATH = /usr/local/rvm/gems/ruby-2.0.0-p353:/usr/local/rvm/gems/ruby-2.0.0-p353@global
mittineague — 2014-01-25T04:58:29-05:00 — #4
I followed http://blog.discourse.org/2013/04/discourse-as-your-first-rails-app/
Having Windows, I needed a VM so I installed https://www.virtualbox.org/
VirtualBox - VirtualBox-4.3.6-91406-Win.exe
then I installed http://www.vagrantup.com/
Vagrant - Vagrant_1.4.3.msi
I already had GitHub installed from before
then I created as repository cloned Discourse to it, opened a shell and ran
... a bunch ...
cd'd to the vagrant directory and ran
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\
# Useful variables
# Export gem paths so that we use the isolated gems.
# Set the path to the Ruby executable
I'm thinking my mistake was where I installed Ruby to but I haven't messed around with it more yet.
kiwiheretic — 2014-01-25T12:39:24-05:00 — #5
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.
kiwiheretic — 2014-01-29T12:50:36-05:00 — #6
So have sitepoint members voted by their non posting here? Is the concensus that discourse is impossible to install unless you're an insider?
mittineague — 2014-02-25T20:12:38-05:00 — #7
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
But, finally success
kiwiheretic — 2014-02-27T20:26:37-05:00 — #8
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.