0

I trying to setup web server for publish git repositories on successfully installed and worked redmine server.

Passenger occurs error: Web application could not be started

uninitialized constant GitHttp (NameError) config.ru:16:in block in <main>' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/builder.rb:55:ininstance_eval' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/builder.rb:55:in initialize' config.ru:1:innew' config.ru:1:in <main>' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:105:ineval' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:105:in preload_app' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:150:in' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:29:in <module:PhusionPassenger>' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:28:in'

/usr/local/rvm/wrappers/ruby-2.0.0-p247/ruby

0

GitHttp is a class in released versions of grack (last is 0.2) which does not exist anymore in project's git master branch.

I suspect you updated your grack code to master HEAD without updating config.ru. Your config.ru for master should be like this, with project path replaced :

$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/lib')

use Rack::ShowExceptions

require 'grack'
require 'git_adapter'

config = {
  :project_root => "/path/to/your/repos/",
  :adapter => Grack::GitAdapter,
  :git_path => '/usr/bin/git',
  :upload_pack => true,
  :receive_pack => true,
}

run Grack::App.new(config)
  • Thank you very much. This is solved my problem. I use old article from redmine wiki. And error stops me. – vskubriev Oct 2 '13 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.