Giter Club home page Giter Club logo

rjgit_adapter's Issues

Gollum-lib throwing errors after latest RJGit update

From the test output:

TypeError: cannot convert instance of class org.jruby.RubyString to class org.eclipse.jgit.revwalk.RevCommit
org/jruby/java/proxies/JavaProxy.java:364:in `java_send'
/~/.rvm/gems/jruby-9.2.0.0@gollum-lib/gems/rjgit-5.4.2.0/lib/git.rb:271:in `checkout'
[...]/gollum-rjgit_adapter/lib/rjgit_adapter/git_layer_rjgit.rb:191:in `checkout'

Searching throws ArgumentError - invalid byte sequence in UTF-8

Searching in gollum using the RJGit adapter throws an ArgumentError. The relevant part of the stack trace:

ArgumentError - invalid byte sequence in UTF-8:
	org/jruby/RubyString.java:3806:in `scan'
	[...]/gollum-lib/lib/gollum-lib/wiki.rb:518:in `block in search'
	[...]/gollum-lib_rjgit_adapter/lib/rjgit_adapter/git_layer_rjgit.rb:173:in `block in grep'
	org/jruby/RubyArray.java:1734:in `each'
	[...]/gollum-lib_rjgit_adapter/lib/rjgit_adapter/git_layer_rjgit.rb:170:in `grep'
	[...]/gollum-lib/lib/gollum-lib/wiki.rb:512:in `search'
	[...]/gollum/lib/gollum/app.rb:473:in `block in GET /gollum/search'

Error on bundle install

Hi, I try to bundle the gem in order to run spec tests and get the error below. I run OSX 10.15 with jruby-9.2.6.0. Can somebody help?

--- ERROR REPORT TEMPLATE -------------------------------------------------------

Error Report

Questions

Please fill out answers to these questions, it'll help us figure out
why things are going wrong.

  • What did you do?

    I ran the command /Users/danielsenff/.rvm/gems/jruby-9.2.6.0@global/bin/bundle

  • What did you expect to happen?

    I expected Bundler to...

  • What happened instead?

    Instead, what happened was...

  • Have you tried any solutions posted on similar issues in our issue tracker, stack overflow, or google?

    I tried...

  • Have you read our issues document, https://github.com/bundler/bundler/blob/master/doc/contributing/ISSUES.md?

    ...

Backtrace

NoMethodError: undefined method `[]' for nil:NilClass
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/source/git/git_proxy.rb:90:in `version'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/source/git/git_proxy.rb:147:in `block in copy_to'
  org/jruby/RubyDir.java:399:in `chdir'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/shared_helpers.rb:52:in `block in chdir'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/stdlib/monitor.rb:226:in `mon_synchronize'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/shared_helpers.rb:51:in `chdir'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/source/git/git_proxy.rb:136:in `copy_to'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/source/git.rb:163:in `specs'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/definition.rb:764:in `block in converge_locked_specs'
  org/jruby/RubyArray.java:1792:in `each'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/definition.rb:750:in `converge_locked_specs'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/definition.rb:247:in `resolve'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/definition.rb:170:in `specs'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/definition.rb:158:in `resolve_remotely!'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/installer.rb:303:in `resolve_if_needed'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/installer.rb:84:in `block in run'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/process_lock.rb:12:in `block in lock'
  org/jruby/RubyIO.java:1157:in `open'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/process_lock.rb:9:in `lock'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/installer.rb:73:in `run'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/installer.rb:25:in `install'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/cli/install.rb:66:in `run'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/cli.rb:256:in `block in install'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/settings.rb:124:in `temporary'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/cli.rb:255:in `install'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/exe/bundle:46:in `block in <main>'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
  /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/lib/ruby/gems/shared/gems/bundler-2.1.4/exe/bundle:34:in `<main>'
  org/jruby/RubyKernel.java:1008:in `load'
  /Users/danielsenff/.rvm/gems/jruby-9.2.6.0@global/bin/bundle:23:in `<main>'

Environment

Bundler             2.1.4
  Platforms         ruby, universal-java-9
Ruby                2.5.3p0 (2019-02-11 revision 66309) [java]
  Full Path         /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/bin/jruby
  Config Dir        /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/etc
RubyGems            2.7.6
  Gem Home          /Users/danielsenff/.rvm/gems/jruby-9.2.6.0
  Gem Path          /Users/danielsenff/.rvm/gems/jruby-9.2.6.0:/Users/danielsenff/.rvm/gems/jruby-9.2.6.0@global
  User Home         /Users/danielsenff
  User Path         /Users/danielsenff/.gem/jruby/2.5.0
  Bin Dir           /Users/danielsenff/.rvm/gems/jruby-9.2.6.0/bin
OpenSSL             
  Compiled          JRuby-OpenSSL 0.10.4
  Loaded            JRuby-OpenSSL 0.10.4
  Cert File         /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/lib/security/cacerts
  Cert Dir          /etc/ssl/certs
Tools               
  Git               
  RVM               1.29.9 (latest)
  rbenv             not installed
  chruby            not installed
  rubygems-bundler  (1.4.5)
Gem.ruby            /Users/danielsenff/.rvm/rubies/jruby-9.2.6.0/bin/jruby
bundle #!           /usr/bin/env jruby

Bundler Build Metadata

Built At          2020-01-05
Git SHA           32a4159325
Released Version  true

Bundler settings

gem.test
  Set for the current user (/Users/danielsenff/.bundle/config): "minitest"
gem.mit
  Set for the current user (/Users/danielsenff/.bundle/config): true
gem.coc
  Set for the current user (/Users/danielsenff/.bundle/config): true

Gemfile

Gemfile

source 'https://rubygems.org'

gemspec
gem 'rake', '>= 12.3.3'
gem 'adapter_specs', :git => 'https://github.com/gollum/adapter_specs.git'

group :test do
  gem "simplecov"
end

Gemfile.lock

<No /Users/danielsenff/Produktion/Ruby/Gems/caramelize/gollum/rjgit_adapter/Gemfile.lock found>

Gemspecs

gollum-rjgit_adapter.gemspec

# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "rjgit_adapter/version"

Gem::Specification.new do |s|
  s.name        = "gollum-rjgit_adapter"
  s.version     = Gollum::Lib::Git::VERSION
  s.platform    = "java"
  s.authors     = ["Bart Kamphorst, Dawa Ometto"]
  s.email       = ["[email protected]"]
  s.homepage    = "https://github.com/repotag/gollum-lib_rjgit_adapter"
  s.summary     = %q{Adapter for Gollum to use RJGit at the backend.}
  s.description = %q{Adapter for Gollum to use RJGit at the backend.}

  s.add_runtime_dependency "rjgit", "> 5.6.0", "~> 5.6.0"
  s.add_development_dependency "rspec", "3.4.0"

  s.files         = Dir['lib/**/*.rb'] + ["README.md", "Gemfile"]
  s.require_paths = ["lib"]

  # = MANIFEST =
  s.files = %w(
    Gemfile
    LICENSE
    README.md
    Rakefile
    gollum-rjgit_adapter.gemspec
    lib/rjgit_adapter.rb
    lib/rjgit_adapter/git_layer_rjgit.rb
    lib/rjgit_adapter/version.rb
  )
  # = MANIFEST =
end

--- TEMPLATE END ----------------------------------------------------------------

Unfortunately, an unexpected error occurred, and Bundler cannot continue.

First, try this link to see if there are any existing issue reports for this error:
https://github.com/bundler/bundler/search?q=undefined+method+%60%5B%5D%27+for+nil+NilClass&type=Issues

If there aren't any reports for this error yet, please create copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
https://github.com/bundler/bundler/issues/new

`apply_patch` only works with non-bare repositories

It looks like the apply_patch method (which we will have to rework into a revert method) currently only works with non-bare repositories, since RJGit just wraps jgit's porcelain ApplyCommand, which reads files from the worktree.

Looks like working around this will require us to somehow re-implement ApplyCommand#apply in such a way that it will operate on a string or input stream that's not on-disk.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.