Gitweb access to gitolite repository

Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn

Problem
You are trying to set up gitolite access through gitweb but the gitweb page, shows ‘no projects avaiable’ even though you have repositories available.

Solution
Try to follow the guide here.
Some of tthe most important steps for having the right access permissions are:

  • Add the www-data user in the gitolite group by:
    $ sudo usermod -a -G gitolite www-data
  • Add the paths to the repositories and the projects list:
    $ sudo vi /etc/gitweb.conf
    $projectroot ="/var/lib/gitolite/repositories";
    $projects_list="/var/lib/gitolite/projects.list";
  • Change the permissions in the repositories:
    $ sudo chmod g+r /var/lib/gitolite/projects.list
    $ sudo chmod -R g+rx /var/lib/gitolite/repositories
  • Change permissions in the /var/lib/gitolite/.gitolite.rc file to allow access to the repositories:
    $REPO_UMASK = 0027;
  • Finally change the git-daemon to run with the gitolite group permissions in the file /etc/sv/git-daemon/run:
    exec chpst -ugitdaemon:gitolite

uninitialized constant Capybara (NameError) – rails 3.0.7

Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn

Problem
When trying to use cucumber in a new rails 3.0.7 application you get the following error when running rake cucumber for the first time:
uninitialized constant Capybara (NameError)

Solution
As cucumber is moving to using capybara instead of webrat as default, if you follow the instructions in the Rspec book for setting up you would get the above error.
What you would need to do is to replace webrat with capybara.
You can do that by commenting out /removing webrat from your Gemfile and then adding the following:

gem 'capybara'
gem 'database_cleaner'