2011-08-26 32 views
2

我在我的web服務器上安裝gitorious。一切工作正常,除了混帳後臺程序,我得到以下錯誤,當我運行它Gitorious Git-daemon Ruby寶石錯誤

/etc/init.d/git-daemon start 
Starting git-daemon: /usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:31:in `setup': 
You have already activated daemons 1.1.4, but your Gemfile requires daemons 1.1.0. 
Consider using bundle exec. (Gem::LoadError) 
    from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.18/lib/bundler/runtime.rb:17:in `setup' 
    from /usr/local/lib/ruby/gems/1.8/gems/bundler-1.0.18/lib/bundler.rb:107:in `setup' 
    from /var/www/gitorious/script/../config/../config/preinitializer.rb:16 
    from /var/www/gitorious/script/../config/boot.rb:28:in `load' 
    from /var/www/gitorious/script/../config/boot.rb:28:in `preinitialize' 
    from /var/www/gitorious/script/../config/boot.rb:10:in `boot!' 
    from /var/www/gitorious/script/../config/boot.rb:123 
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require' 
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require' 
    from /var/www/gitorious/script/../config/environment.rb:11 
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require' 
    from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require' 
    from /var/www/gitorious/script/git-daemon:11 

failure 

我已經安裝了企業紅寶石1.8.7和Ruby 1.4.2寶石。我正在運行Ubuntu 11.04。

我怎麼解決它?

感謝

回答

2

最簡單的方式(但不是很面向未來):

gem uninstall daemons 
cd /var/www/gitorious 
bundle install 

難的方法:修改/etc/init.d/git-daemon,使其運行cd /var/www/gitorious && bundle exec /var/www/gitorious/script/git-daemon start

+0

它的工作卸載最新版本。謝謝! – dextervip

+0

謝謝,你節省了我的時間 – damluar

+0

其實,當使用最新的gem和rubygems使用bundle的時候,唯一的辦法就是讓它工作。所以修改腳本的方式很難。非常感謝 ! – Gepsens