read
Thanks to Christian Johansen for the excellent detailed instructions on setting up Gitorious here. I eventually got it working, which I would not have done without this help. Here are some notes from setting it up on the following versions:
Ubuntu Server 10.10 as a VMware VM ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux] RubyGems 1.5.0 Rails 3.0.3 ActiveMQ 5.4.2
- I got as far as
sudo rake gems:install
and got the following error:rake aborted! Your config/gitorious.yml does not have an entry for your current Rails environment. Please consult config/gitorious.sample.yml for instructions.
which I fixed by doingsudo rake gems:install RAILS_ENV=production
- Then I got an error "
undefined local variable or method `version_requirements'
" which had me stuck for a while (being a Rails n00b). Google eventually led me to this: https://www.redmine.org/issues/7516 and theenvironment.rb
hack from Phillip Koebbe fixed it for me. - When adding the first user, the command
script/console
gave me the following messagesLoading development environment (Rails 2.3.5) /var/www/git.moo.li/gitorious/config/environment.rb:26:RuntimeError: Your config/gitorious.yml does not have an entry for your current Rails environment. Please consult config/gitorious.sample.yml for instructions. /var/www/git.moo.li/gitorious/vendor/rails/railties/lib/rails/backtrace_cleaner.rb:2:NameError: uninitialized constant ActiveSupport::BacktraceCleaner /var/www/git.moo.li/gitorious/vendor/rails/railties/lib/console_with_helpers.rb:5:NameError: uninitialized constant ApplicationController
so I triedenv RAILS_ENV=production ruby script/console
which worked fine. Presumably I couldexport $RAILS_ENV=production
to fix both these? - I couldn't login until I'd enabled Passenger and Apache because the mongrel server on port 3000 didn't like the fact that the Gitorious login page had an
https://
URL. In other words, I had to defer the user setup until I had the Passenger server working. - The Passenger install only instructed me to create a
passenger.load
file. Apassenger.conf
wasn't needed. - In the section on enabling some Apache modules,
rewrite
is enabled twice, which is unnecessary. - I couldn't run the login page at first until I installed the i18n gem v0.1 - it didn't like the v0.5 version.
- At first I couldn't upload my public key. This seemed to be a problem with ActiveMQ. I added the following line to
activemq.xml
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/>
(there wasn't a stomp connector in there before). By the way, there were nonetworkConnectors
lines in myactivemq.xml
so I didn't change the multicasting setup. - I also did
update-rc.d activemq defaults
so that ActiveMQ starts at boot time. - [EDITED to add:]
I also found that the Sphinx cron job was causing errors. Here's what I did to fix it. Firstly, the cron job couldn't find the
indexer
command, so I did acrontab -e
and added the following lines to the crontab.SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
- Also, the cron rob running every minute was creating a lot of unecessary mail, so I appended
> /dev/null
to the end of the line defining the job. - Next the Sphinx configuration file was using the deprecated Sphinx
searchd
optionsaddress
andport
so I commented them out and added thelisten
option instead. I did this in both theproduction.conf
anddefault.base
files within theconfig/ultrasphinx
folder of the Gitorious app. Here's what those lines in thesearchd
section looked like afterwards:# address = 0.0.0.0 # port = 3312 listen = 0.0.0.0:3312