Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error with bin/jruby -S gem install asd #2623

Closed
mkristian opened this issue Feb 26, 2015 · 3 comments
Closed

error with bin/jruby -S gem install asd #2623

mkristian opened this issue Feb 26, 2015 · 3 comments

Comments

@mkristian
Copy link
Member

$ bin/jruby -S gem install asd --backtrace
ERROR:  Could not find a valid gem 'asd' (>= 0) in any repository
ERROR:  While executing gem ... (NoMethodError)
    undefined method `+' for nil:NilClass
    /home/christian/projects/active/maven/jruby/lib/ruby/stdlib/rubygems/text.rb:60:in `levenshtein_distance_CLOSURE_1_CLOSURE_2__levenshtein_distance_CLOSURE_1_1'
    org/jruby/RubyString.java:5277:in `each_char'
    org/jruby/RubyEnumerator.java:299:in `each'
    org/jruby/RubyEnumerator.java:443:in `each_with_index'
    /home/christian/projects/active/maven/jruby/lib/ruby/stdlib/rubygems/text.rb:58:in `levenshtein_distance_CLOSURE_1__levenshtein_distance_0'
    org/jruby/RubyString.java:5277:in `each_char'
    org/jruby/RubyEnumerator.java:299:in `each'
    org/jruby/RubyEnumerator.java:443:in `each_with_index'
    /home/christian/projects/active/maven/jruby/lib/ruby/stdlib/rubygems/text.rb:55:in `__script__'
    /home/christian/projects/active/maven/jruby/lib/ruby/stdlib/rubygems/spec_fetcher.rb:194:in `suggest_gems_from_name'
    org/jruby/RubyArray.java:2306:in `map'
    /home/christian/projects/active/maven/jruby/lib/ruby/stdlib/rubygems/spec_fetcher.rb:191:in `suggest_gems_from_name'
    /home/christian/projects/active/maven/jruby/lib/ruby/stdlib/rubygems/command.rb:164:in `show_lookup_failure'
    /home/christian/projects/active/maven/jruby/lib/ruby/stdlib/rubygems/commands/install_command.rb:306:in `install_gems'
    org/jruby/RubyArray.java:1569:in `each'
    /home/christian/projects/active/maven/jruby/lib/ruby/stdlib/rubygems/commands/install_command.rb:295:in `install_gems'
    /home/christian/projects/active/maven/jruby/lib/ruby/stdlib/rubygems/commands/install_command.rb:202:in `execute'
    /home/christian/projects/active/maven/jruby/lib/ruby/stdlib/rubygems/command.rb:307:in `invoke_with_build_args'
    /home/christian/projects/active/maven/jruby/lib/ruby/stdlib/rubygems/command_manager.rb:168:in `process_args'
    /home/christian/projects/active/maven/jruby/lib/ruby/stdlib/rubygems/command_manager.rb:138:in `run'
    /home/christian/projects/active/maven/jruby/lib/ruby/stdlib/rubygems/gem_runner.rb:54:in `run'
    /home/christian/projects/active/maven/jruby/bin/jgem:21:in `(root)'
    org/jruby/RubyKernel.java:984:in `load'
    /home/christian/projects/active/maven/jruby/bin/gem:4:in `__script__'

this could be due to the psych be a default gem now or in general psych related or nothing to do with psych. I came across it while investigating a regression due to psych now being a default gem.

@mkristian mkristian added this to the 9.0.0.0.pre2 milestone Feb 26, 2015
@enebo
Copy link
Member

enebo commented Feb 27, 2015

@mkristian This might be changes we made to IR recently (which will be changed very soon). Please run 'JRUBY_OPTS=-X-C -S jruby -S gem install asdf' and see if this error goes away. We have a race between interp and JIT again. I am fixing this now but we have decided to make some larger fixes because we keep introducing races every few months.

@mkristian
Copy link
Member Author

mkristian commented Feb 27, 2015 via email

@headius
Copy link
Member

headius commented Mar 12, 2015

This should be working just fine with newly-landed IR improvements. Worked for me locally (in as much as it only reported the missing gem and not the + error).

@headius headius closed this as completed Mar 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants