stevenharman / git_tracker

Some simple tricks that make working with Pivotal Tracker even better... and easier... um, besier!
https://github.com/stevenharman/git_tracker
MIT License
170 stars 11 forks source link

Exception whenever I try to run git_tracker #9

Closed tubbo closed 12 years ago

tubbo commented 12 years ago

I get the following when I run git tracker:

♬  cd Code/project; git tracker
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require': /Users/tom/.rvm/gems/ruby-1.9.3-p125@elocal/gems/git_tracker-1.3.1/lib/git_tracker/branch.rb:7: undefined (?...) sequence: /#?(?<number>\d+)/ (SyntaxError)
/Users/tom/.rvm/gems/ruby-1.9.3-p125@elocal/gems/git_tracker-1.3.1/lib/git_tracker/branch.rb:15: undefined (?...) sequence: /refs\/heads\/(?<name>.+)/
  from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
  from /Users/tom/.rvm/gems/ruby-1.9.3-p125@elocal/gems/git_tracker-1.3.1/lib/git_tracker/prepare_commit_message.rb:1
  from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
  from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
  from /Users/tom/.rvm/gems/ruby-1.9.3-p125@elocal/gems/git_tracker-1.3.1/lib/git_tracker.rb:2
  from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
  from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
  from /Users/tom/.rvm/gems/ruby-1.9.3-p125@elocal/gems/git_tracker-1.3.1/bin/git-tracker:3
  from /Users/tom/.rvm/gems/ruby-1.9.3-p125@elocal/bin/git-tracker:19:in `load'
  from /Users/tom/.rvm/gems/ruby-1.9.3-p125@elocal/bin/git-tracker:19
  from /Users/tom/.rvm/gems/ruby-1.9.3-p125@global/bin/ruby_bundler_wrapper:23

It began happening when I mucked with my RVM configuration, updated using rvm get stable and it did some shit to my .zshrc...

spuchi commented 12 years ago

I'm experiencing the same issue on a fresh install of git-tracker when running git-tracker install

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /Library/Ruby/Gems/1.8/gems/git_tracker-1.3.1/lib/git_tracker/branch.rb:7: undefined (?...) sequence: /#?(?<number>\d+)/ (SyntaxError)
/Library/Ruby/Gems/1.8/gems/git_tracker-1.3.1/lib/git_tracker/branch.rb:15: undefined (?...) sequence: /refs\/heads\/(?<name>.+)/
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /Library/Ruby/Gems/1.8/gems/git_tracker-1.3.1/lib/git_tracker/prepare_commit_message.rb:1
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /Library/Ruby/Gems/1.8/gems/git_tracker-1.3.1/lib/git_tracker.rb:2
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /Library/Ruby/Gems/1.8/gems/git_tracker-1.3.1/bin/git-tracker:3
    from /usr/bin/git-tracker:19:in `load'
    from /usr/bin/git-tracker:19```
stevenharman commented 12 years ago

@spuchi It looks like you're running on Ruby 1.8, which does not support named captures in Regular Expressions. Currently git_tracker only supports Ruby 1.9. Please open a new issue to add 1.8 suport (something I suspected would be needed, but was waiting to see if anyone actually wanted it).

@tubbo In your case, I see you're using RVM, setting the current Ruby to 1.9.3, but it looks like some calls are slipping back to system Ruby, which I suspect is still a 1.8 variant, causing the named captures to blow up, as in @spuchi's case.

Do you have a custom RVM setup? Are you able to use RVM for other binaries?

tubbo commented 12 years ago

@stevenharman I am able to use RVM for other binaries, I use RVM all day long on all of my Rails projects. As far as a "custom RVM"...no I do not have one set up, but I have used both rvm get stable and rvm get head to obtain my RVM version and neither has worked. I should note that this issue came up when I upgraded RVM...

alindeman commented 12 years ago

@tubbo, can you paste the output of the following commands in the same environment that's showing the error?

$ echo $PATH
$ ruby -v
stevenharman commented 12 years ago

@spuchi I just closed Issue #10, which added Ruby 1.8.7 support, and pushed a new version of git_tracker to Ruby Gems. Update to at least version 1.4.0 for Ruby 1.8 support.

spuchi commented 12 years ago

Great job! Thank you! :)

stevenharman commented 12 years ago

@tubbo Any updates? If you're still experiencing the issue, please see @alindeman's comment above.

@spuchi Glad it worked out for you.

stevenharman commented 12 years ago

@tubbo I'm going to close this assuming that you were able to resolve the issue. Let me know if you're still having the problem and I can re-open.