Installing Gitorious on Ubuntu 11.04

This guide is based on the Ubuntu Installation Guide from the Gitorious Wiki, but it is a little outdated, so here’s my updated version.

Sudo make sandwich

Pretty much all of the following commands need to be executed as the superuser, so first of all we make ourselves root (alternatively you could prepend sudo to every command, but that is rather tiresome. I do not recommend to always work as root though, because that way you will incur the wrath of the invisible pink unicorn):

$ sudo su
[sudo] password for <username>:

Install packages

When installing all these packages, you will be asked for a MySQL root password, which you should remember, because you will need it later on.

$ aptitude install \
    build-essential zlib1g-dev tcl-dev libexpat-dev libxslt1-dev \
    libcurl4-openssl-dev postfix apache2 mysql-server mysql-client \
    apg geoip-bin libgeoip1 libgeoip-dev sqlite3 libsqlite3-dev \
    imagemagick libpcre3 libpcre3-dev zlib1g zlib1g-dev libyaml-dev \
    libmysqlclient15-dev apache2-dev libonig-dev ruby-dev rubygems \
    libopenssl-ruby libdbd-mysql-ruby libmysql-ruby \
    libmagick++-dev zip unzip memcached git-core git-svn git-doc \
    git-cvs irb

Install Ruby Gems

Apparently some of the gems required by Gitorious need at least RubyGems v1.4 to work, and Ubuntu 11.04 ships with v1.3.7, so you need to force-update RubyGems (“force” because usually you would update RubyGems through aptitude):

$ REALLY_GEM_UPDATE_SYSTEM=1 gem update --system

Now we can install all the necessary gems:

$ gem install --no-ri --no-rdoc -v 0.8.7 rake && \
    gem install --no-ri --no-rdoc -v 1.1.0 daemons && \
    gem install -b --no-ri --no-rdoc \
        rmagick stompserver passenger bundler

You may ask yourself why there are significantly less Gems here compared to the old guide. This is because bunder installs all those Gems automagically from the data in the Gemfile.lock

Installing the Sphinx Search Server

$ wget http://sphinxsearch.com/files/sphinx-0.9.9.tar.gz && \
    tar -xzf sphinx-0.9.9.tar.gz && \
    cd sphinx-0.9.9 && \
    ./configure --prefix=/usr && \
    make all install

Getting Gitorious

$ git clone git://gitorious.org/gitorious/mainline.git /var/www/gitorious && \
    cd /var/www/gitorious && \
    git submodule init && \
    git submodule update

Easy as pie. Now we just need to put the Gitorious binary on our path:

$ ln -s /var/www/gitorious/script/gitorious /usr/bin

Configuring services

Gitorious needs a bunch of background services, so we need to copy the supplied startup scripts:

$ cd /var/www/gitorious/doc/templates/ubuntu/ && \
    cp git-daemon git-poller git-ultrasphinx stomp /etc/init.d/ && \
    cd /etc/init.d/ && \
    chmod 755 git-daemon git-poller git-ultrasphinx stomp

and enable them:

$ update-rc.d git-daemon defaults && \
    update-rc.d git-poller defaults && \
    update-rc.d git-ultrasphinx defaults && \
    update-rc.d stomp defaults

We need to create an additional symlink, because all the startup scripts have RUBY_HOME set to /opt/ruby-enterprise (alternatively we could just patch the files, but this way it is easier and you can update the scripts if needed):

$ ln -s /usr/ /opt/ruby-enterprise

Configuring Apache

Passenger

First of all, we need to compile the Apache2 passenger module:

$ $(gem contents passenger | grep passenger-install-apache2-module)

The passenger configuration script will tell you exactly what you’ll need to add to your apache configuration. The part you need to copy looks like this:

Please edit your Apache configuration file, and add these lines:

    LoadModule passenger_module <some path>
    PassengerRoot <another path>
    PassengerRuby <yet another path>

After you restart Apache, you are ready to deploy any number of Ruby on Rails
applications on Apache, without any further Ruby on Rails-specific
configuration!

These three lines need to be inserted into

/etc/apache2/mods-available/passenger.load

Enabling necessary modules

$ a2enmod passenger && \
    a2enmod rewrite && \
    a2enmod ssl

Creating the Apache2 sites

  • Create /etc/apache2/sites-available/gitorious (see files below)
  • Create /etc/apache2/sites-available/gitorious-ssl (see files below)

Now we need to disable the default site, and enable our freshly created Gitorious sites:

$ a2dissite default && \
    a2dissite default-ssl && \
    a2ensite gitorious && \
    a2ensite gitorious-ssl

Creating a MySQL user for gitorious

$ mysql -u root -p
Enter password: (your mysql root password you selected while installing the packages)
mysql> GRANT ALL PRIVILEGES ON *.* TO 'gitorious'@'localhost' IDENTIFIED BY '<insert password>' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;

Configuring Gitorious

First of all, we need to make sure we have all gems in the correct version for Gitorious, so we run the following:

$ cd /var/www/gitorious/ && \
    bundle install && \
    bundle pack

Now we can create the user under which Gitorious will run and serve the Git repositories:

$ adduser --system --home /var/www/gitorious/ --no-create-home --group --shell /bin/bash git && \
    chown -R git:git /var/www/gitorious

Then we need to create some stuff that Gitorious needs to run:

$ su - git && \
    mkdir .ssh && \
    touch .ssh/authorized_keys && \
    chmod 700 .ssh && \
    chmod 600 .ssh/authorized_keys && \
    mkdir tmp/pids && \
    mkdir repositories && \
    mkdir tarballs

Creating the Gitorious configuration

Lets copy the sample configuration files to the correct path:

$ cp config/database.sample.yml config/database.yml && \
    cp config/gitorious.sample.yml config/gitorious.yml && \
    cp config/broker.yml.example config/broker.yml

Now edit the config/database.yml and make sure you set the correct username and password in the production section. After that, we need to set a couple of things in config/gitorious.yml:

  • Make sure you are configuring the right section (not test:, but production:)
  • repository_base_path should be /var/www/gitorious/repositories
  • cookie_secret needs to be set to a random value >= 30 characters
  • gitorious_client_port should be 80
  • gitorious_host needs to be the exact hostname that clients will use (cookies get messed up otherwise)
  • archive_cache_dir should be /var/www/gitorious/tarballs
  • archive_work_dir should be something like /tmp/tarballs-work
  • hide_http_clone_urls should be true (they require extra unknown setup to work)
  • is_gitorious_dot_org should be false

Creating the Gitorious database

Because of an incompatibility of RubyGems with Rails < 2.3.11 you need to add the following line at the top of config/boot.rb:

require 'thread'

Now we let rake do all the work for us:

$ export RAILS_ENV=production && \
    bundle exec rake db:create && \
    bundle exec rake db:migrate && \
    bundle exec rake ultrasphinx:bootstrap

Create the Sphinx Cronjob

$ crontab -e * * * * * cd /var/www/gitorious && /usr/bin/bundle exec rake ultrasphinx:index RAILS_ENV=production

Create an admin user

env RAILS_ENV=production ruby1.8 script/create_admin

Reboot

You’re finally done. Reboot your Ubuntu machine, and your Gitorious installation should be up and running. If you find an error, feel free to leave a comment and I will fix it as soon as possible :)

Files

gitorious

<VirtualHost *:80>
    ServerName your.server.com
    DocumentRoot /var/www/gitorious/public
</VirtualHost>

gitorious-ssl

<IfModule mod_ssl.c>
    <VirtualHost _default_:443>
        DocumentRoot /var/www/gitorious/public
        SSLEngine on
        SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
        SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
        BrowserMatch ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
    </VirtualHost>
</IfModule>

158 thoughts on “Installing Gitorious on Ubuntu 11.04

  1. It looks like before running

    $ cd /var/www/gitorious/ && \
        bundle install

    One should run:

    gem install bundle

    Otherwise, I got a

    bundle: command not found

  2. Awesome writeup, was super easy to follow!

    I’ve got one problem, everything seems to be working until I try and login, and I get this error:

    ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken):

    I followed your guide exactly with one exception, I activated the admin user via the console, but I don’t think that would cause this issue? Any idea on how I could fix, I’m dying to get it working!

    Thanks!

    • Hey there. I’ve been having this problem ever since I first installed Gitorious, and it is a Chrome/Safari only problem, at least for me.

      The problem seems to be that Gitorious is not able to run on subdomains or IPs, so you’ll have to set “gitorious_host” to something that has the format “<name>” or “<name>.<domain>”. I’ve been able to get it running, for example, using

      • gitorious
      • gitorious.local (bonjour/zeroconf)

      If you don’t have a DNS you can just add these to your hosts file

      Hope that helps :)

  3. Yeah it works perfectly in Firefox, just confirmed that, it’s only a chrome/safari issue.

    For me though, my host is set to a real production FQDN, so it’s git.domain.com. So shouldn’t that work in chrome/safari?

    Also, when having it set to git.domain.com I get a error inside my production log:

    The specified gitorious_host is reserved in Gitorious See http://gitorious.org/gitorious/pages/ErrorMessages for further explanation

    Does this mean I’m not supposed to use git.domain.com as the FQDN?

    • Yeah, you shouldn’t use git.domain.com because Gitorious uses it to serve it’s repositories (apparently, couldn’t see that in my installation :D, but that is what the wiki page you linked to says).

      Apparently it doesn’t matter to Gitorious if it is a FQDN or not, it just doesn’t work on subdomains. Could you try it on a “domain.com” to verify that it really is the same issue that I’m having over here. That would make it way easier to submit a bug report, because I can’t make my Gitorious installation world accessible.

      • Yeah, changed it from git to gitorious.domain.com and that fixed that error, it also started to work in Safari when I did that, but not Chrome.

        I changed it to domain.com and that fixed the issue in Chrome/Safari.

        Mine is world accessible, so we could replicate it there just to be sure.

  4. Before running bundle exec rake db:migrate I also had to uncomment this line in config/environment.rb

    config.action_controller.session_store = :active_record_store

    and add this line:

    config.action_controller.session = { :key => “gitorious”, :secret => “secret phrase of at least 30 characters” }

  5. I was getting fatal errors when trying to push from a remote location without:

    gitorious_client_host : localhost

    in gitorious.yml

    Also, for some reason my install really insists on creating the repositories right in /var/www/gitorious instead of /var/www/gitorious/repositories.

    I’m not sure if this is the reason or not, but when I first installed it, I seem to have accidentally put repository_base_path: “/var/www/gitorious” instead of “/var/www/gitorious/repositories”… I deleted the mysqldatabase and started over from scratch starting with cloning gitorious off their site, but it still insists on just dumping all the repository data right in the root directory…

    Kindof annoying, but at least it finally works!

    Oh, and for some unknown reason, the second time around I couldn’t do

    bundle install
    without this guy:

    sudo apt-get install libxslt1-dev

  6. For “Francis Varga”…

    I was having the same issues this morning. I reran this step:

    su – git && \ mkdir .ssh && \ touch .ssh/authorized_keys && \ chmod 700 .ssh && \ chmod 600 .ssh/authorized_keys && \ mkdir tmp/pids && \ mkdir repositories && \ mkdir tarballs

    and maybe this(although I cant remember if I actually ran this as the git user or not):

    su – git cd /var/www/gitorious/ bundle install

  7. Pingback: Ruby on Rails 備忘録 – Ride On Rails » Blog Archive » Gitoriousのインストール

  8. Everything up and running on Ubuntu 11.04. I can create repos from gitorious and everything.

    I have added my public key to my user account.

    But when I try to

    git remote add origin git@gitorious.domain.com:project/repo.git git push origin master I get prompted to write the password for the git user. What might be the issue?

    Tried to google but only find people having issues with github and official gitorious.org.

      • I think so. Do you know what service that should take care of the ssh push actions etc?

        git 996 0.0 2.7 192060 113512 ? Sl Oct05 0:32 poller git 1013 0.0 0.0 27728 1156 ? S Oct05 0:02 searchd –config /var/www/gitorious/config/ultrasphinx/production.conf git 1036 0.0 0.4 63608 16608 ? S Oct05 0:07 /opt/ruby-enterprise/bin/ruby /usr/bin/stompserver -w /var/www/gitorious/tmp/stomp -q file -s queue git 1222 0.0 2.8 206596 116316 ? S Oct05 0:00 Rails: /var/www/gitorious git 1648 0.0 2.6 180984 108272 ? S Oct05 0:00 /opt/ruby-enterprise/bin/ruby /var/www/gitorious/script/git-daemon -d

    • I checked through and think I understand the authentication a little bit more now.

      When I created the “.ssh” dir in /var/www/gitorious then gitorious created an authorized_keys file for ssh authentication when I added another public key.

      It’s still not authenticating me though, I only get asked for password when trying to push to the server. What I understand this is usually cause I have invalid pub key but I tried to generate / add / delete keys back and forth without change.

      • What you could try is a ssh -vvv git@gitorious.domain.com to see where it actually fails (-vvv stands for “very very verbose”).

        • Got it to work finally. I will write down my issues here incase someone else have the same. Sorry for cluttering up your blog Lucas but thanks for this excellent guide for Gitorious! :)

          1. Directories that was missing I had to manually add “/var/www/gitorious/tmp/pids” and “/var/www/gitorious/.ssh” directories. These are needed for poller and ssh auth.

          2. I had wrong permissions on “/var/www/gitorious/”, “/var/www/gitorious/.ssh” and “/var/www/gitorious/.ssh/autorized_keys” so ssh refused to use the keys thus prompting me to type password when trying to make the initial “git push origin master”. If you look in “/var/log/auth.log” you will notice the message “Authentication refused: bad ownership or modes for directory” if you have this issues. Fixing this is easy by issuing “chmod go-w /var/www/gitorious”, “chmod 700 /var/www/gitorious/.ssh” and “chmod 600 /var/www/gitorious/.ssh/authorized_keys”. Make sure that git owns gitorious dir swell….

  9. Thanks for the guide, seems a lot better than most, easy to follow, and wasn’t having any issues.

    Only problem is now, coming to do “bundle install”, I get:

    Installing nokogiri (1.5.0) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.8 extconf.rb

    checking for libxml/parser.h… yes

    checking for libxslt/xslt.h… no

    libxslt is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.

    An error occured while installing nokogiri (1.5.0), and Bundler cannot continue. Make sure that

    gem install nokogiri -v '1.5.0'
    succeeds before bundling.

    Any help would be awesome. Thanks

    • Okay, maybe I should have done a little more digging first, after running: sudo apt-get install libxslt1-dev it then installed. Seems like Stephen J. Fuhry (#comment-96) had the same issue for some reason too.

  10. root@potter:/var/www/gitorious# export RAILS_ENV=production && bundle exec rake ultrasphinx:bootstrap (in /var/www/gitorious) Rebuilding configurations for production environment Available models are Comment, Repository, MergeRequest, and Project Generating SQL $ indexer –config ‘/var/www/gitorious/config/ultrasphinx/production.conf’ –all Sphinx 0.9.9-release (r2117) Copyright (c) 2001-2009, Andrew Aksyonoff

    using config file ‘/var/www/gitorious/config/ultrasphinx/production.conf’… WARNING: key ‘address’ is deprecated in /var/www/gitorious/config/ultrasphinx/pr oduction.conf line 10; use ‘listen’ instead. indexing index ‘main’… ERROR: index ‘main’: sql_range_query: Unknown column ‘base_tags.name’ in ‘field list’ (DSN=mysql://root:***@localhost:3306/gitorious_production). total 0 docs, 0 bytes total 0.007 sec, 0 bytes/sec, 0.00 docs/sec total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg Sphinx 0.9.9-release (r2117) Copyright (c) 2001-2009, Andrew Aksyonoff

    using config file ‘/var/www/gitorious/config/ultrasphinx/production.conf’… WARNING: key ‘address’ is deprecated in /var/www/gitorious/config/ultrasphinx/pr oduction.conf line 10; use ‘listen’ instead. listening on all interfaces, port=3312 WARNING: index ‘main’: preload: failed to open /var/www/gitorious/db/sphinx//sph inx_index_main.sph: No such file or directory; NOT SERVING FATAL: no valid indexes to serve Failed to start Done Please restart your application containers

  11. Sorry about that comment before, didn’t go through as expected :( I’m having issues with the sphinx bootstrap on the creating database step, I get a lot of errors. Here’s what I get:

    root@potter:/var/www/gitorious# export RAILS_ENV=production && bundle exec rake ultrasphinx:bootstrap (in /var/www/gitorious) Rebuilding configurations for production environment Available models are Comment, Repository, MergeRequest, and Project Generating SQL $ indexer –config ‘/var/www/gitorious/config/ultrasphinx/production.conf’ –all Sphinx 0.9.9-release (r2117) Copyright (c) 2001-2009, Andrew Aksyonoff

    using config file ‘/var/www/gitorious/config/ultrasphinx/production.conf’… WARNING: key ‘address’ is deprecated in /var/www/gitorious/config/ultrasphinx/pr oduction.conf line 10; use ‘listen’ instead. indexing index ‘main’… ERROR: index ‘main’: sql_range_query: Unknown column ‘base_tags.name’ in ‘field list’ (DSN=mysql://root:***@localhost:3306/gitorious_production). total 0 docs, 0 bytes total 0.007 sec, 0 bytes/sec, 0.00 docs/sec total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg Sphinx 0.9.9-release (r2117) Copyright (c) 2001-2009, Andrew Aksyonoff

    using config file ‘/var/www/gitorious/config/ultrasphinx/production.conf’… WARNING: key ‘address’ is deprecated in /var/www/gitorious/config/ultrasphinx/pr oduction.conf line 10; use ‘listen’ instead. listening on all interfaces, port=3312 WARNING: index ‘main’: preload: failed to open /var/www/gitorious/db/sphinx//sph inx_index_main.sph: No such file or directory; NOT SERVING FATAL: no valid indexes to serve Failed to start Done Please restart your application containers

    Any ideas why that could be?

  12. Regarding – Francis Varga issue: https://github.com/roman/rots.git (at master) is not checked out. Please run bundle install

    I’ve got the same. Seems I’ve fixed it with something similar to what matt weppler has explained on http://coding-journal.com/installing-gitorious-on-ubuntu-11-04/#comment-98.

    I’m a absolute ZERO on ruby & rails, then it would be great is someone can confirm what user has to used on: cd /var/www/gitorious/ && bundle install root or git ?

    I’ve found an article based on this one (http://blog.kyodium.net/2011/09/install-gitorious-on-ubuntu-1104.html ) where an script will ALL STEPS need is provided. In this script su – git is done before running

    export RAILS_ENV=production && \ bundle exec rake db:create && \ bundle exec rake db:migrate && \ bundle exec rake ultrasphinx:bootstrap

    If I run this as git I get issue regarding rots missing.

    Hope this comments is not a lot confusing, but I would like to know is somethings has to be added to this excelent tutorial in order to install gitorious without glitches.

    Thank a lot to Lucas for this superb guide

  13. Hey there. At the beginning of the guide we completely switch to root mode, that means that cd /var/www/gitorious/ && bundle install has to be run as root as well. At some point we create the git user and switch to it (after the first bundle install call) and everything after that is run as the git user, which includes the following command:

    $ export RAILS_ENV=production && \
        bundle exec rake db:create && \
        bundle exec rake db:migrate && \
        bundle exec rake ultrasphinx:bootstrap

    This worked perfectly for me when I installed it. Have you tried running it as root? It actually shouldn’t make much of a difference. As soon as I have time I will try another installation run on a fresh Ubuntu 11.04, hopefully I’ll then get the same error which would allow me to find a workaround. For now I’m don’t really have a good idea on how to fix it, sorry.

  14. Lucas: thanks for your anwser. I’va done “export RAILS_ENV=production && \ bundle exec rake db:create && \ bundle exec rake db:migrate && \ bundle exec rake ultrasphinx:bootstrap” as root.

    Then after server restart, I’ve had the error when trying to start git-daeom: https://github.com/roman/rots.git (at master) is not checked out. Please run bundle install

    I also will try to find time to REPEAT all steps and give you feedback. Now I’ve giturious running but … when I try to register a new user I get error: “Sorry, something went wrong Gitorious encountered an server error. We are automatically notified of errors and will look into it. If the error persists beyond what’s reasonable, let us know.”

    can be this error a issue related to POSTFIX configuration ?

    regards

    Francisco

  15. I’ve had a problem with the cookie_secret option in the last step of this tutorial where this option needs to be replaced with something longer than the default “sssht” in the config/gitorious.yml file.

    The hint to solve this is also included in the comments there, but they misspelled “apq”, which should be “apg” as long as I know. You could mention this in the tutorial just to complete the writeup.

    Nevertheless, thanks a lot for this, worked out pretty well for me!

    • I added the cookie_secret setting to the guide, thanks :) Also, for me it says apg -m 64 in the comment above the option, and I just pulled the latest version. Did you perhaps misread? ;)

  16. The Gitorious repository uses submodules for some javascript dependancies, without getting these some errors occur when building pages, I noticed that the clone urls were all blank.

    After this step

    git clone git://gitorious.org/gitorious/mainline.git /var/www/gitorious
    we need to do the following
    cd /var/www/gitorious &&
        git submodule init &&
        git submodule update

  17. I’ve been having the following error in the database creation step:

    git@my-comp:~$ export RAILS_ENV=production && \

    bundle exec rake db:create &amp;&amp; \
    bundle exec rake db:migrate &amp;&amp; \
    bundle exec rake ultrasphinx:bootstrap

    (in /var/www/gitorious) Couldn’t create database for {“encoding”=>”utf8″, “username”=>”root”, “adapter”=>”mysql”, “database”=>”gitorious_production”, “host”=>”localhost”, “password”=>nil}, charset: utf8, collation: utf8_unicode_ci (if you set the charset manually, make sure you have a matching collation) (in /var/www/gitorious) rake aborted! Secret should be something secure, like “18d97308454972ee56ffc60959b6d97d”. The value you provided, “ssssht”, is shorter than the minimum length of 30 characters

    (See full trace by running task with –trace)

    I’m new to… everything actually, so please be gentle :)

    • I’m not sure about the database collation thing. Did you manually create the gitorious_production database, perhaps? And the second error occurs because you haven’t set a proper value for cookie_secret in your “gitorious.yml” configuration file.

        • No, that should definitely make no difference as you install everything through the package manager, which usually takes care of the platform dependent issues for you.

      • Regarding the error message above, I think there’s only one problem here, not two. The utf8_unicode_ci collation is the one I always use with utf8 charset, so that’s probably just an irrelevant warning. What would be a proper value for cookie_secret? any long enough random sequence of characters would do? Should I take it from somewhere?

        • Yes, any random sequence of characters will do, as far as I know. I’m using a hexadecimal string (e.g. b5b2d76255991ffbd697ebdf046725db1b2ffeb63ad) which you could, for example, generate using

          dd if=/dev/urandom bs=100 count=1 2>/dev/null | hexdump -v -e '1/1 "%02x"'

    • I haven’t tested it yet, but this guide should work on Ubuntu 11.10. Also there is no major difference between the GUI and the Server version (except for the missing Window Server) so it (again) should be working there too.

  18. The rake step produced the following errors:

    ERROR: index 'main': sql_range_query: Unknown column 'base_tags.name' in 'field list' (DSN=mysql://root:***@localhost:3306/gitorious_production).

    and

    using config file '/var/www/gitorious/config/ultrasphinx/production.conf'...
    WARNING: key 'address' is deprecated in /var/www/gitorious/config/ultrasphinx/production.conf line 10; use 'listen' instead.
    listening on all interfaces, port=3312
    WARNING: index 'main': preload: failed to open /var/www/gitorious/db/sphinx//sphinx_index_main.sph: No such file or directory; NOT SERVING
    FATAL: no valid indexes to serve
    Failed to start
    Done
    Please restart your application containers

  19. in the mysql privileges query should not there be ‘git’@'localhost’ as created by adduser (afterwards)?

    on the other side, i get the same issues as jonathan on the (ultrasphinx) rake step :-(

  20. Under the “Creating the Apache2 sites” stage – how exactly do I create them? Is it simply creating the directories (mkdir) or should I place files there? From where?

    • You’ll have to take a look at your log files to see what is going wrong! Given the fact that it happens when you try to login, I’d guess that it is a problem with the gitorious_host setting though. What did you configure it to be?

  21. Hello At the step with: export RAILS_ENV=production && \ bundle exec rake db:create && \ bundle exec rake db:migrate && \ bundle exec rake ultrasphinx:bootstrap

    I see this error: git@gitux:~$ export RAILS_ENV=production && bundle exec rake db:create && bundle exec rake db:migrate && bundle exec rake ultrasphinx:bootstrap Invalid gemspec in [/var/lib/gems/1.8/specifications/childprocess-0.2.1.gemspec]: invalid date format in specification: “2011-08-11 00:00:00.000000000Z” Invalid gemspec in [/var/lib/gems/1.8/specifications/json-1.6.1.gemspec]: invalid date format in specification: “2011-09-18 00:00:00.000000000Z” Invalid gemspec in [/var/lib/gems/1.8/specifications/json-1.5.4.gemspec]: invalid date format in specification: “2011-08-31 00:00:00.000000000Z” Invalid gemspec in [/var/lib/gems/1.8/specifications/childprocess-0.2.1.gemspec]: invalid date format in specification: “2011-08-11 00:00:00.000000000Z” Invalid gemspec in [/var/lib/gems/1.8/specifications/json-1.6.1.gemspec]: invalid date format in specification: “2011-09-18 00:00:00.000000000Z” Invalid gemspec in [/var/lib/gems/1.8/specifications/json-1.5.4.gemspec]: invalid date format in specification: “2011-08-31 00:00:00.000000000Z” NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It will be removed on or after 2011-10-01. Gem::Specification#has_rdoc= called from /var/www/gitorious/.bundler/ruby/1.8/rots-babb5559aae8/rots.gemspec:19 . Could not find json-1.5.4 in any of the sources

    Any ideas? Thanks, david

    • I had the same problem as you David and my solution was to edit the s.date element in /var/lib/gems/1.8/specifications/json-1.5.4.gemspec and /var/lib/gems/1.8/specifications/childprocess-0.2.1.gemspec, removing the 0000000000Z at the end of the date fixed the problem. My json-1.5.4.gemspec s.date reads %q{2011-08-31}

    • This is most likely a problem with your

      gitorious_host
      setting. Make sure that you’re setting the exact same FQDN you see in your browser bar, otherwise it won’t work. There is a bug with this setting too, see this bug entry for more info.

  22. After i successfully installed the gitorious,it worked first time,but next day i reboot my ubuntu,and use msysgit on win7,the following error occured:

    Pushing to git@192.168.22.244:gps/gemfield-gps.git == Gitorious: ==========================================================

    Access denied or bad command

    fatal: The remote end hung up unexpectedly

    what is the reason?

  23. The su – git && mkdir .ssh etc command needs to be split in two. i.e first “su – git” and once in the git user’s env, execute mkdir && etc.

  24. I’m on a fresh ubuntu 11.10 install and am getting an error with the crontab step. My exact command:

    crontab -e * * * * * cd /var/www/gitorious && /usr/bin/bundle exec rake ultrasphinx:index RAILS_ENV=production

    Here’s what I get: crontab: usage error: no arguments permitted after this option

    Any ideas?

    • Interesting. If I remember correctly, this worked perfectly for me on 11.04… What you could try is to call

      crontab -e
      without parameters, and then adding the
      cd /var/www/gitorious &amp;&amp; /usr/bin/bundle exec rake ultrasphinx:index RAILS_ENV=production
      line manually to the file with the editor which opens.

      Let me know if that works for you :)

  25. Thanks Lucas for this tutorial.

    I have successfully installed gitorious on an Ubuntu 11.10 machine. The only two changes I had to do: bundle did get installed in /usr/local/bin instead of /usr/bin stomp did get installed in /usr/local/bin instead of /usr/bin so I did modify the crontab to: crontab -e * * * * * cd /var/www/gitorious && /usr/local/bin/bundle exec rake ultrasphinx:index RAILS_ENV=production and most importantly I have modified the /etc/init.d/stomp to: GEMS_HOME=”/usr/local” (used to be GEMS_HOME=”/usr”) Stomp was a bit tricky to find because gitorious is working even without stomp but it’s slow and adding users is not quite right. So my advice, check /var/log/apache2/error.log and if there is a line like that: connect failed: Connection refused – connect(2) will retry in 5 you are missing stomp

  26. Thanks for the nice article. I am facing a problem with git submodule update it says:

    $ git submodule update Cloning into public/javascripts/lib/buster-core… fatal: reference is not a tree: 1f8ac20fcbd75ff9dc6e537a90883e4103c1b877 Unable to checkout ’1f8ac20fcbd75ff9dc6e537a90883e4103c1b877′ in submodule path ‘public/javascripts/lib/buster-core’

    Anyone else facing similar problem? Any ideas, how to resolve this?

  27. I ignored the error I got for git submodule update and completed the remaining steps, Gitorious seems to be working fine. I noticed one thing, I have used user ‘gitorious’ instead of ‘git’ so I had to edit the file /etc/init.d/stomp modify start() to look like below:

    /bin/su – gitorious -c “$STOMP”

  28. I can’t get passed this command

    bundle exec rake db:migrate

    I received the following error:

    root@zombihq:/var/www/gitorious# bundle exec rake db:migrate (in /var/www/gitorious) rake aborted! private method `split’ called for nil:NilClass

    anyone has any ideas?

  29. hello lucas

    getting this error while running REALLY_GEM_UPDATE_SYSTEM=1 gem update –system == 1.8.15 / 2012-01-06

    • 1 bug fix:

      • Don’t eager load yaml, it creates a bad loop. Fixes #256

    system ubuntu 11.04 ( 32 bit)

    Thanks

  30. Hello everyone, gettting this error after running this coomand : bundle exec rake ultrasphinx:bootstrap

    Rebuilding configurations for production environment Available models are Comment, Repository, MergeRequest, and Project Generating SQL $ indexer –config ‘/var/www/gitorious/config/ultrasphinx/production.conf’ –all Sphinx 0.9.9-release (r2117) Copyright (c) 2001-2009, Andrew Aksyonoff

    using config file ‘/var/www/gitorious/config/ultrasphinx/production.conf’… WARNING: key ‘address’ is deprecated in /var/www/gitorious/config/ultrasphinx/production.conf line 10; use ‘listen’ instead. indexing index ‘main’… ERROR: index ‘main’: sql_range_query: Unknown column ‘base_tags.name’ in ‘field list’ (DSN=mysql://root:***@localhost:3306/gitorious_database). total 0 docs, 0 bytes total 0.047 sec, 0 bytes/sec, 0.00 docs/sec total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg Sphinx 0.9.9-release (r2117) Copyright (c) 2001-2009, Andrew Aksyonoff

    using config file ‘/var/www/gitorious/config/ultrasphinx/production.conf’… WARNING: key ‘address’ is deprecated in /var/www/gitorious/config/ultrasphinx/production.conf line 10; use ‘listen’ instead. listening on all interfaces, port=3312 WARNING: index ‘main’: preload: failed to open /var/www/gitorious/db/sphinx//sphinx_index_main.sph: No such file or directory; NOT SERVING FATAL: no valid indexes to serve Failed to start Done Please restart your application containers

    pls help me out

    • Looks to me as if the file

      /var/www/gitorious/db/sphinx//sphinx_index_main.sph
      should exist, or might not be writable. Have you tried doing a
      touch /var/www/gitorious/db/sphinx//sphinx_index_main.sph
      when logged in with the Gitorious user?

  31. Great guide, the only one I’ve been through that actually works, thanks.

    Now I am now trying to move the authentication onto LDAP using the instructions found here: http://gitorious.org/gitorious/pages/LdapIntegration but it throws out “TypeError: can’t convert String into Integer”. I’ve Googled around but have been unable to find an answer specific to Gitorious.

    Have you tried to use LDAP with this configuration? Do you have any suggestions on how I can solve this problem

    Thanks for any help David

    • Hey there David,

      no, I haven’t tried LDAP integration myself, and unfortunately I have no better advice than to check the code where the TypeError occurs and try to fix it (and of course submit your fix to Gitorious :) With a bit of luck it won’t be hard to fix.

  32. I was updating my laptop from version 10 to 11.04 but the problem is that it failed to restart lather than it is in the command window with some words which i failed to understand and work with it.”GNU GRUB version 1.98-1ubuntu10″ and the next line is minimal BASH-like line editing is supported .for the first word ,TAB lists is possible command completions.Anywhere else TAB lists possible device or file completions” that is the words written so please i need your help to solve this problem please help me

    • Hey there. This post isn’t about installing (or updating to) Ubuntu 11.04, and I frankly don’t know anything about the updating process, so I’d suggest you ask your question in the Ubuntu Forums

  33. Greetings, after some hiccups (I am a Linux noob) I got it all running. here my personal blunders:

    • The thing with the rots stuff – I went through the step outlined in the comments to get the repository and install/pack the bundle again
    • Not sure why, but the log files under /var/www/gitorious/log had incorrect permissions, had to chmod 0666 the log files.
    • My ubuntu server did not respond to ssh requests, so I couldnt’t check anything in against the repos. After doing “apt-get install openssh-server” that part now also works

    But all in all, thanks for being my guide in this dark alley of a typical “you have to know it” type of problem :)

  34. So I finally found some time and a spare VM to get this installed onto. I have Ubuntu 11.04, completely fresh install. The guide worked wonderfully. I’ve got Gitorious up and running (sorta). I’ve set both gitorious_client_host and gitorious_host to git.cookiecache.com It seems to continue to fail in Safari, but everything seems to work (login, registering and such) in FireFox. That’s not the issue though, the issue is that after navigating through 1 or 2 pages everything crashes. Apache, MySQL, Postfix, SSHd, everything…has anyone else experienced this? I have setup my VPS container to use a 2.4GHz processor, 1GB of RAM and 20GBs of disk space. It rarely goes over 0.5 load avg and 27% of memory used. Any ideas? Any other further information I can provide to help troubleshoot? Any assistance is greatly appreciated!

  35. Pingback: Install Holla « garyalan.net

  36. Hi,

    So far i’ve got the gitorious application running and everything works. My problem is that I’m unable to clone, push or pull repo’s. As if the git port is closed or non-existent even though i’ve setup the iptables.

    Any help on what to do to get the GIT port working woul be appreciated!

    • Have you checked if the ports are open through

      127.0.0.1
      ? I’d guess that some of the necessary services aren’t running. Gitorious relies on a number of daemons outside of the RoR application.

  37. Thanks for the guide. I’ve got this setup and running on 11.10

    I had to do this to get it running: vi /var/www/gitorious/config/ultrasphinx/production.conf # replace base_tags with tags

    bundle exec rake ultrasphinx:index RAILS_ENV=production

    It’s working now, but when I create repositories, it doesn’t work. It sits on “This repository is being created” forever and doesn’t do anything.

    I then have to run “script/poller run” manually. I then get spammed with: NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01. Gem::SourceIndex#add_spec called from /usr/local/lib/site_ruby/1.8/rubygems/source_index.rb:127.

    The webpage then updates with: Sorry, something went wrong

    Gitorious encountered an server error. We are automatically notified of errors and will look into it. If the error persists beyond what’s reasonable, let us know.

    Files do get created in /var/www/gitorious/repositories; however, if I try to view a repository via gitorious, I get the same “something went wrong” error.

    How do I actually find out what it’s failing on? Why do I have to run the poller manually?

    My crontab is: * * * * * cd /var/www/gitorious && /usr/bin/bundle exec rake ultrasphinx:index RAILS_ENV=production

    thanks.

    • Try accessing it locally to see what the proper error is.

      If you’re using your full address like git.example.com it makes errors neat (and uninformative) whereas localhost will give you the error trace.

  38. looks like I found the error:

    [code] ActionView::TemplateError (/var/www/gitorious/repositories/d51/8cf/0bdd7f4c0b0c147af4377552e0a38cc564.git) on line #46 of app/views/repositories/_overview.html.erb: 43: :locals => {:repository => repository} -%> 44: 45: 46: 47:

    <

    div class="branches"> 48:

    <

    ul class="branch_list"> 49:

  39. Branches:
  40. [/code]

  41. I go this working. Make sure your folder permissions are: git:www-data.

    ie chown -R git:www-data gitorituous

    Also, make sure the cron job is set on the git user.

  42. I had to add “script/poller run” to git’s crontab though… not sure how the poller is supposed to run normally.

  43. Hi,

    Thank for this tuto, but I’ve a problem during the database creation with the command “bundle exec rake db:create” Couldn’t create database for {“encoding”=>”utf8″, “username”=>”gitorious”, “adapter”=>”mysql”, “database”=>”gitorious”, “host”=>”localhost”, “password”=>nil}, charset: utf8, collation: utf8_unicode_ci (if you set the charset manually, make sure you have a matching collation)

    Can you help me ?

  44. Pingback: Installing Holla « garyalan.net

  45. Thanks for the very useful guide on setting up Gitorious on Ubuntu 11.04.

    After referring to the link:- http://gitorious.org/gitorious/pages/LdapIntegration , I ran the script to test my ldap connection. That passed successfully without any issues. I am basically setting up Gitorious on my localbox.

    Currently, I am making use of certs on my localbox for https. Now when I try to enter the same credentials during login, I get the below error:-

    ActionController::InvalidAuthenticityToken in SessionsController#create

    ActionController::InvalidAuthenticityToken

    App Trace:-

    /var/www/gitorious/vendor/rails/actionpack/lib/action_controller/request_forgery_protection.rb:79:in

    verify_authenticity_token'
    /var/www/gitorious/vendor/rails/activesupport/lib/active_support/callbacks.rb:178:in
    send’ /var/www/gitorious/vendor/rails/activesupport/lib/active_support/callbacks.rb:178:in
    evaluate_method'
    /var/www/gitorious/vendor/rails/activesupport/lib/active_support/callbacks.rb:166:in
    call’ /var/www/gitorious/vendor/rails/actionpack/lib/action_controller/filters.rb:225:in
    call'
    /var/www/gitorious/vendor/rails/actionpack/lib/action_controller/filters.rb:629:in
    run_before_filters’ /var/www/gitorious/vendor/rails/actionpack/lib/action_controller/filters.rb:615:in
    call_filters'
    /var/www/gitorious/vendor/rails/actionpack/lib/action_controller/filters.rb:610:in
    perform_action_without_benchmark’ /var/www/gitorious/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in
    perform_action_without_rescue'
    /var/www/gitorious/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in
    ms’ /usr/lib/ruby/1.8/benchmark.rb:308:in
    realtime'
    /var/www/gitorious/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in
    ms’ /var/www/gitorious/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in
    perform_action_without_rescue'
    /var/www/gitorious/vendor/rails/actionpack/lib/action_controller/rescue.rb:160:in
    perform_action_without_flash’ /var/www/gitorious/vendor/rails/actionpack/lib/action_controller/flash.rb:146:in
    perform_action'
    /var/www/gitorious/vendor/rails/actionpack/lib/action_controller/base.rb:532:in
    send’ /var/www/gitorious/vendor/rails/actionpack/lib/action_controller/base.rb:532:in
    process_without_filters'
    /var/www/gitorious/vendor/rails/actionpack/lib/action_controller/filters.rb:606:in
    process’ /var/www/gitorious/vendor/rails/actionpack/lib/action_controller/base.rb:391:in
    process'
    /var/www/gitorious/vendor/rails/actionpack/lib/action_controller/base.rb:386:in
    call’ /var/www/gitorious/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:437:in `call’ .

    Any ideas on how I can over come this ?

    Currently my gitorious_host is localhost.local , after referring to an earlier comment (http://coding-journal.com/installing-gitorious-on-ubuntu-11-04/#comment-76 ) . I am making use of apache2 server, thus my gitorious_client_host is localhost .

    I was thinking if I disable SSL on localhost in my gitorious.yml, it might be of some help. If disabling SSL is the way, do I need to do it anywhere else as well ?. I was thinking of this on the grounds that anyways there wouldn’t be many security concerns if we disable https on localhost(to my best knowledge).

    If there are other work arounds, kindly suggest.

    Thank you..

  46. Hi, thanks for tutor.. but I have problem when I do /etc/init.d/git-daemon start .. the error is

    Gem::SourceIndex#add_spec called from /usr/local/lib/site_ruby/1.8/rubygems/source_index.rb:127.
    NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
    Gem::SourceIndex#add_spec called from /usr/local/lib/site_ruby/1.8/rubygems/source_index.rb:127.
    NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
    Gem::SourceIndex#add_spec called from /usr/local/lib/site_ruby/1.8/rubygems/source_index.rb:127.
    /var/www/gitorious/script/git-daemon:18:in `expand_path': can't convert nil into String (TypeError)
        from /var/www/gitorious/script/git-daemon:18
    failure

    :( can You help me or tell what happen, wether I miss some configuration?

      • hy lucas, thanks for your help. Thats error have been fixed.. but I have another problem, when I try to login to my gitorious server it get error “500 Internal Server Error” , maybe you know what happen or I miss some configuration again? thanks before lucas.

  47. Hi,

    Thanks for your good Tutorial. It’s great ! But, …. I have a problem. I can go to Gitorious on https://. I can login with my account LDAPS has gitorious, but when I am connected I can’t create project. I have this message on my log (log/production.log) ActiveRecord::StatementInvalid (Mysql::Error: Lock wait timeout exceeded; … AND ** ultrasphinx: configuration file not found for “production” environment ** ultrasphinx: please run ‘rake ultrasphinx:configure’ ** ultrasphinx: spelling support not available (raspell configuration raised “u$ Invalid subdomain name localhost/gitorious. Session cookies will not work!

    I can not find a solution. Can you help me ?

    And an other question. Before I had her log too, but I never saw them and I do not know why. Do you know what they mean? (production.log) Errno::EPIPE (Broken pipe): ….

    Thanks for your help in advanced and excuse me for my english because I speak french….

    Bye

    • Hi Olivier,

      I can only guess what the problem is here, but you could try the following:

      1. Change the gitorious domain to something like “gitorious.dev” instead of “localhost”, everything without a dot or more than one dot in it may cause problems (at least it did for me)
      2. Did you run
        rake ultrasphinx:configure
        and if so, what did it say?
      • Hi Lucas,

        Thanks for your answer. It’s Ok for my subdomain. Thanks

        For ultrasphinx I still have the problem and I can’t create an new project.

        –> production.log

        ** ultrasphinx: spelling support not available (raspell configuration raised “uninitialized constant Ultrasphinx::Spell::Aspell”)

        For ultrasphinx, I execute this command $ export RAILS_ENV=production && bundle exec rake ultrasphinx:bootstrap With this command I have an error “Rebuilding configurations for production environment ERROR: index ‘main’: sql_range_query: Unknown column ‘base_tags.name’ in ‘field list’ (DSN=mysql://root:***@localhost:3306/gitorious_production). Failed to start”

        And for information $bundle exec rake ultrasphinx:configure Rebuilding configurations for production environment Available models are Comment, Repository, MergeRequest, and Project Generating SQL

  48. Excuse me for all these questions…. I cannot login with user admin. Why ? Yet, the script to create the admin is successful and the admin is in the database.

    Thanks in advanced Olivier

  49. I followed this tut for Ubuntu 12.04, and it seems te work, except for one thing: repo’s aren’t actual being created. I looked in the /var/www/gitorious/repositories but it is empty. On my screen i keep getting the message “This repository is being created, it will be ready pretty soon…” for over an hour now..

    Have you got any suggestion whats wrong? Thanks!

    • Have you checked the permissions and ownership of your repositiories folder? Other than that, you’d have to check the logs for an error message which indicates what is going on, because I didn’t run into that problem yet.

        • I really can’t say because I can’t current access a machine on which Gitorious is installed. If I remember correctly, there is a “logs/” directory in the Gitorious project folder, which is probably a good place to start. I think that they use DelayedJobs to create the repositories, and its logs may not show up in the main “production.log”, that would be for you to investigate.

          • I had the same issue. The problem was that the poller daemon wasn’t running. The /etc/init.d/git-poller script invokes ruby directly and it should invoke it via “bundle exec” instead.

  50. Pingback: Codepool Blog - Gitorious and Redmine on Ubuntu Server 12.04

  51. First I would like to thank the author. Secondly, LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.9/ext/apache2/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.9 PassengerRuby /usr/bin/ruby1.8

    the version number of passenger should be 3.0.13 when I install it on Amazon EC2 12.04 Server

    Thirdly, $ crontab -e * * * * * cd /var/www/gitorious && /usr/bin/bundle exec rake ultrasphinx:index RAILS_ENV=production should be $ crontab -e and then add * * * * * cd /var/www/gitorious && /usr/bin/bundle exec rake ultrasphinx:index RAILS_ENV=production Actually I am suggesting running ultrasphinx:index once every hour.

    • Thanks for your feedback. I changed the “passenger” part so that it is clear that one should use the output from the passenger install script, and not the example I pasted.

      Could you explain what issues you are having with the crontab command? Because the command you posted seems to be the same I used in the post, and it runs sphinx every minute, as far as I know.

  52. Hi, Great guide. Something quite catasrophic happened though. Everything seemed to go swimmingly and then I rebooted and couldn’t login to my computer -_- I assume it’s the server being initialized, faulting and returning me back to the login page very quickly. Anyway, I’ve managed to login through a different account and su my way back in. On attempting to start apache I’m getting this error:

    apache2ctl restart

    apache2: Syntax error on line 210 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/passenger.load: Cannot load /usr/lib/ruby/gems/1.8/gems/passenger-3.0.9/ext/apache2/mod_passenger.so into server: /usr/lib/ruby/gems/1.8/gems/passenger-3.0.9/ext/apache2/mod_passenger.so: cannot open shared object file: No such file or directory

    Any ideas/advice would be greatly appreciated.

    Thanks Njall

    • This looks similar to the trouble Xinbenlv was having. Did you copy the content for “passenger.load” from this page or from the output of the passenger install script? If you copied it from this page, try running the install script again :)

  53. The below step giving error in Ubuntu 12.04 LTS server REALLY_GEM_UPDATE_SYSTEM=1 gem update –system

    Updating RubyGems Updating rubygems-update ERROR: While executing gem … (Gem::GemNotFoundException) Could not find a valid gem ‘rubygems-update’ (1.8.24) locally or in a repository

    Any pointer to this problem ?

  54. Hello Sir,

    Your guide is really very good but after all this instruction i got this error. Please help me.

    We are currently experiencing a problem with git where, when a user attempts to create a new project or attempts to add a new key the browser spins forever without completing the action

    Thanks

  55. Nice tutorial. I would like to share a special behavior. In order to avoid strange issues by “rake db:*” commands, apply quotation for the passwords in database.yml Ex: mysql password = !my.password in /gittorius/config/database.yml write ‘!my.password’, otherwise rake will fail

  56. Hey i keep getting this stupid error Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. in my apache error.log after installing gitorious when i try to browse the site i created a now this might be in the apche configuration but i hope you’ll help out any way

    • This sounds a bit like a configuration issue with hostnames or the like. Make sure that the “gitorious_host” config parameter is set correctly. Also check the URL you are accessing the gitorious installation with, and make sure it matches the “gitorious_host” setting. If all that is the case, check if the internal links being generated by Gitorious somehow point to another URL.

      Another possibility might be that Gitorious actually needs more than 10 internal redirects at some point (which I think is unlikely, but not impossible), so you might try to raise your Apache setting to 100, and if it works then, iteratively decrease it until you found the value that Gitorious requires, and set it to what you’ve found + 10 (just to be sure :D).

      • Ok i made sure that hostname and gitorious_host was the same, but it stille wont work keep getting 500 internal erro at last i added Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all to both gitorious and gitorius-ssl site files in the apache2/sites-enabled and then it all worked. Could you tell me why this was nessecary

  57. Pingback: Installer Gitorious avec RVM

  58. Alright so when i run

    export RAILS_ENV=production && \ bundle exec rake db:create && \ bundle exec rake db:migrate && \ bundle exec rake ultrasphinx:bootstrap

    I Get:

    (in /srv/www/gitorious) rake aborted! Unknown database ‘gitorious_production’ /srv/www/gitorious/Rakefile:10:in `require’ (See full trace by running task with –trace) root@Wolf-Server:/srv/www/gitorious#

    I have tried starting over several times. What i do wrong

  59. Forget about my last post. I just made the database my self and it started filling but now i get this error Mysql::Error: Table ‘gitorious_production.content_memberships’ doesn’t exist: SELECT * FROM

    content_memberships

    Where is it not creating the table

    • It is just a commit with broken logic. I’ve fixed it such way:

      ~/# cat gitorious/db/migrate/20120223093906_make_project_membership_polymorphic_on_subject.rb

      class ProjectMembership < ActiveRecord::Base belongs_to :project belongs_to :member, :polymorphic => true end

      class MakeProjectMembershipPolymorphicOnSubject < ActiveRecord::Migration def self.up

      rename_table :project_memberships, :content_memberships

      add_column :content_memberships, :content_type, :string ProjectMembership.all.each do |pm|   pm.content_type = "Project"   pm.save! end

      rename_column :content_memberships, :project_id, :content_id

      end

      # Destructive – removes any non-project memberships def self.down rename_table :content_memberships, :project_memberships

      ProjectMembership.all.each do |pm|   pm.delete if pm.content_type != "Project" end

      remove_column :project_memberships, :content_type rename_column :project_memberships, :content_id, :project_id

      end end

  60. I have the same problem as Austin: “Mysql::Error: Table ‘gitorious_production.content_memberships’ doesn’t exist: SELECT * FROM…”. I am a perfect “newbe” in ruby but I suspect somehow the command “bundle exec rake db:create” does not do all its jobs!!!! I’ve checked in my schema.db file in db folder and at line 79 I have tabel creation.

  61. Pingback: اسس عملك مفتوح المصدر | Eyadof

  62. Pingback: بيئة عملك مفتوحة المصدر | Eyadof

  63. Pingback: Installing Gitorious on Solaris SPARC

  64. Pingback: Install gitorious on ubuntu 10.04 (braindump) @laurii

  65. Hi, Great article but I got “ELF file OS ABI invalid” when trying to load the passenger module. I use debian squeeze which has a packaged passenger mod, with that it works fine: # apt-get install libapache2-mod-passenger

    Bests, Semir

  66. Hi All, When trying to execute the clone by using this command “git clone git://gitorious.org/gitorious/mainline.git gitorious” I’m getting the below error,How do i proceed.Please do help me on this

    root@gitorioustest:/var/www/git.myserver.com# git clone git://gitorious.org/gitorious/mainline.git gitorious Initialized empty Git repository in /var/www/git.myserver.com/gitorious/.git/ gitorious.org[0: 172.24.170.30]: errno=Connection refused fatal: unable to connect a socket (Connection refused)

  67. Hello!

    I have a problem creating the admin user in the last step of your tutorial. The error is this:

    $ env RAILS_ENV=production ruby1.8 script/create_admin /usr/lib/ruby/gems/1.8/gems/rails-2.3.18/lib/rails/gem_dependency.rb:21:in

    add_frozen_gem_path': undefined method
    source_index’ for Gem:Module (NoMethodError) from /usr/lib/ruby/gems/1.8/gems/rails-2.3.18/lib/initializer.rb:298:in
    add_gem_load_paths'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.18/lib/initializer.rb:132:in
    process’ from /usr/lib/ruby/gems/1.8/gems/rails-2.3.18/lib/initializer.rb:113:in
    send'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.18/lib/initializer.rb:113:in
    run’ from ./script/../config/environment.rb:23 from script/create_admin:2:in `require’ from script/create_admin:2

    Can you help me?

    Thanks

  68. working on localhost….

    => Booting WEBrick => Rails 2.3.11 application starting on http://0.0.0.0:3000 config.load_paths is deprecated and removed in Rails 3, please use autoload_paths instead /usr/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/rails/gem_dependency.rb:21:in

    add_frozen_gem_path': undefined method
    source_index’ for Gem:Module (NoMethodError) from /usr/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:298:in
    add_gem_load_paths'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:132:in
    process’ from /usr/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:113:in
    send'
        from /usr/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/initializer.rb:113:in
    run’ from /svn/dsksic/dsksic/config/environment.rb:9 from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:in
    require'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:in
    require’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:547:in
    new_constants_in'
        from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:in
    require’ from /usr/lib/ruby/gems/1.8/gems/rails-2.3.11/lib/commands/server.rb:84 from script/server:3:in `require’ from script/server:3

  69. Got as far as cloning the gitorious, but trying to copy the services, I get:

    cd /var/www/gitorious/doc/templates/ubuntu/ && \

    cp git-daemon git-poller git-ultrasphinx stomp /etc/init.d/ && \ cd /etc/init.d/ && \ chmod 755 git-daemon git-poller git-ultrasphinx stomp

    cp: cannot stat

    git-poller': No such file or directory
      cp: cannot stat
    stomp’: No such file or directory

    Could it be that git-poller and stomp are missing from the mainline ?

    Would appreciate any comment.

    Thanks

    Nir

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>