tags:

views:

131

answers:

1

I am trying to use Ticgit by running

 ti

I get the following error message

/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- git (LoadError)
        from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /opt/local/lib/ruby/gems/1.8/gems/schacon-ticgit-0.3.6/lib/ticgit.rb:8
        from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /opt/local/lib/ruby/gems/1.8/gems/schacon-ticgit-0.3.6/bin/ti:9
        from /opt/local/bin/ti:19:in `load'
        from /opt/local/bin/ti:19

The problem may be related to MacPorts. It complains that I need to update my Xcode to the newest version, although I have the newest version.

The first line in the error message is strange, since I have the file.

What does the error message tell you?

+3  A: 

Do you have the git rubygem installed?

"/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- git (LoadError)" means you don't have the ruby library available in your load path, not that you don't have the git binary installed.

run 'gem list -l git' and if it doesn't find the library, run 'gem install git'

Mike
@mike: So Gem is a RubyGem package manager which installs packages for programs. If I get the above command again, I can fix the problem by running $gem install <programName>. - - Thank you for your answer!
Masi
Yes and no. Gem is a command which is used to manage installed third party ruby libraries and tools, both of which can be distributed as packages called Ruby Gems. In this case, you had the git binary installed already, but didn't have the similarly named ruby gem which implements ruby-git hooks. It appears Ticgit depended on it.
Mike