mvn build error for [INFO] JRuby Lib Setup ................................... FAILURE #1575

Closed
DouglasAllen opened this Issue Mar 22, 2014 · 3 comments

Projects

None yet

4 participants

@DouglasAllen

All I know is that mvn compile works but mvn and mvn -Pdist give this same error.

[ERROR]
Failed to execute goal
io.tesla.polyglot:tesla-polyglot-maven-plugin:0.0.9:execute
(install_gems) on project jruby-lib:
(InstallError) invalid gem: package is corrupt, exception while verifying: undefined method `path2class' for

Psych::Visitors::ToRuby:0x17ffabb

(NoMethodError) in C:\jruby-dev\lib\target/jruby-openssl-0.9.4.gem ->
[Help 1]

here's the trace from before

spec at C:/jruby-dev/lib/../lib/ruby/shared/rubygems/installer.rb:198
ensure_loadable_spec at C:/jruby-dev/lib/../lib/ruby/shared/rubygems/installer.rb:528
pre_install_checks at C:/jruby-dev/lib/../lib/ruby/shared/rubygems/installer.rb:747
install at C:/jruby-dev/lib/../lib/ruby/shared/rubygems/installer.rb:213
eval_pom at (eval):112
each at org/jruby/RubyArray.java:1549
eval_pom at (eval):103
call at org/jruby/RubyProc.java:276

I hope this helps someone. Let me know if I can get more info.
System is Widows XP 32 single core
ant 1.9.3
maven 3.2.1
jdk1.7.0_51

here's a run
C:\jruby-dev>C:\jruby-dev\bin\jruby -S gem env
io/console not supported; tty will not be manipulated
RubyGems Environment:

  • RUBYGEMS VERSION: 2.2.2
  • RUBY VERSION: 2.1.2 (2014-03-22 patchlevel 0) [java]
  • INSTALLATION DIRECTORY: C:/jruby-dev/lib/ruby/gems/shared
  • RUBY EXECUTABLE: C:/jruby-dev/bin/jruby.exe
  • EXECUTABLE DIRECTORY: C:/jruby-dev/bin
  • SPEC CACHE DIRECTORY: C:/Documents and Settings/Owner/.gem/specs
  • RUBYGEMS PLATFORMS:
    • ruby
    • universal-java-1.7
  • GEM PATHS:
    • C:/jruby-dev/lib/ruby/gems/shared
    • C:/Documents and Settings/Owner/.gem/jruby/2.1
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :backtrace => false
    • :bulk_threshold => 1000
    • "install" => "--no-rdoc --no-ri --env-shebang"
    • "update" => "--no-rdoc --no-ri --env-shebang"
  • REMOTE SOURCES:
  • SHELL PATH:
    • C:\Python33\
    • C:\WINDOWS\system32
    • C:\WINDOWS
    • C:\WINDOWS\System32\Wbem
    • C:\Program Files\MySQL\MySQL Utilities 1.3.6\
    • c:\jruby-1.7.11\bin
    • C:\ant\bin
    • C:\maven\bin
    • C:\Java\jdk1.7.0_51\bin
@mkristian
Member

maybe it is related to the path problem we had here:

9dc9dff#commitcomment-5759934

first I have to admit that the File.join(...) does not use the platform path-separator but always "/" which creates such "mixed" paths like
C:\jruby-dev\lib\target/jruby-openssl-0.9.4.gem

so that could be the whole problem or not.

@DouglasAllen one thing you could try out for me (I do not have access to any windows machine) is - after the error stop the build:

C:\jruby-dev\bin\jruby -I lib\target/lib -e "Gem::Installer.new( 'C:\jruby-dev\lib\target/jruby-openssl-0.9.4.gem',  :ignore_dependencies => true, :install_dir => C:\jruby-dev\lib\target/rubygems' ).install"

that is about the same call the lib/pom.rb script is calling and which fails during the build. if that fails it would be nice to know if works with correct paths.

C:\jruby-dev\bin\jruby -I lib\target\lib -e "Gem::Installer.new( 'C:\jruby-dev\lib\target\jruby-openssl-0.9.4.gem',  :ignore_dependencies => true, :install_dir => C:\jruby-dev\lib\target\rubygems' ).install"
  • thanx
@areman
Contributor
areman commented Mar 26, 2014

Hi,
I got the same error. After running the gem intaller command an excpetion is raised

NotImplementedError: unlink unsupported or native support failed to load
unlink at org/jruby/RubyFile.java:1110
remove_file at C:/Av/jruby/lib/ruby/2.1/fileutils.rb:1464
platform_support at C:/Av/jruby/lib/ruby/2.1/fileutils.rb:1469
remove_file at C:/Av/jruby/lib/ruby/2.1/fileutils.rb:1463
remove_file at C:/Av/jruby/lib/ruby/2.1/fileutils.rb:801
rm at C:/Av/jruby/lib/ruby/2.1/fileutils.rb:578
each at org/jruby/RubyArray.java:1549
rm at C:/Av/jruby/lib/ruby/2.1/fileutils.rb:577
rm_f at C:/Av/jruby/lib/ruby/2.1/fileutils.rb:600

This error happens only in dev, in 1.7.11 the following command works fine.
jruby -v -r fileutils -e "FileUtils.touch('file.txt')" -e "FileUtils.rm_f('file.txt')"

But I think it's another Problem and not related to this topic.

@mkristian mkristian closed this in 9aaea42 Apr 8, 2014
@mkristian
Member

added some path separator hack from jruby-1_7 branch which should solve the problem on windows.

@mkristian mkristian added a commit that referenced this issue Apr 8, 2014
@mkristian mkristian Revert "fix windows problem with build, i.e. convert platform depende…
…nt path to ruby path-format. fixes #1575"

This reverts commit 9aaea42.

something is not working at all . . . [skip ci]
daa96d8
@enebo enebo added this to the JRuby 1.7.12 milestone Apr 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment