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

Update RubyGems fails #1479

Closed
guizmaii opened this issue Nov 22, 2018 · 5 comments
Closed

Update RubyGems fails #1479

guizmaii opened this issue Nov 22, 2018 · 5 comments
Assignees
Milestone

Comments

@guizmaii
Copy link

guizmaii commented Nov 22, 2018

Hi,

I was trying Truffle v1.0.0-RC9 and just after installing it, I tried to update RubyGems, which failed:

➜  gem update --system
Updating rubygems-update
Fetching: rubygems-update-2.7.8.gem (100%)
Successfully installed rubygems-update-2.7.8
Parsing documentation for rubygems-update-2.7.8
Installing ri documentation for rubygems-update-2.7.8
Installing darkfish documentation for rubygems-update-2.7.8
ERROR:  While executing gem ... (RDoc::Error)
    error generating index.html: unexpected return (LocalJumpError)

It was very long and finally failed.

Here's my Graal version:

~ java -version
openjdk version "1.8.0_192"
OpenJDK Runtime Environment (build 1.8.0_192-20181024123616.buildslave.jdk8u-src-tar--b12)
GraalVM 1.0.0-rc9 (build 25.192-b12-jvmci-0.49, mixed mode)

here's my Ruby version:

➜  ruby -v
truffleruby 1.0.0-rc9, like ruby 2.4.4, GraalVM CE Native [x86_64-darwin]
@chrisseaton
Copy link
Collaborator

There's not much backtrace there! I can't find a --trace option or similar in the gem command, so could you possibly run with -Xbacktraces.raise to achieve the same thing, and post the results, please?

@guizmaii
Copy link
Author

guizmaii commented Nov 22, 2018

Yes, of course.

How can I pass this option ? because adding it to the command line doesn't work:

➜  gem update --system -Xbacktraces.raise
ERROR:  While executing gem ... (OptionParser::InvalidOption)
    invalid option: -Xbacktraces.raise

@chrisseaton
Copy link
Collaborator

Ah sorry, use TRUFFLERUBYOPT=-Xbacktraces.raise gem update ....

https://github.com/oracle/truffleruby/blob/vm-1.0.0-rc9/doc/user/options.md

@guizmaii
Copy link
Author

I did that:

➜  gem update --system -- -Xbacktraces.raise         
Updating rubygems-update
Successfully installed rubygems-update-2.7.8
Parsing documentation for rubygems-update-2.7.8
Done installing documentation for rubygems-update after 3 seconds
Parsing documentation for rubygems-update-2.7.8
Done installing documentation for rubygems-update after 1 seconds
Installing RubyGems 2.7.8
Bundler 1.16.6 installed
RubyGems 2.7.8 installed
Regenerating binstubs
Parsing documentation for rubygems-2.7.8
Installing ri documentation for rubygems-2.7.8

=== 2.7.8 / 2018-11-02

Minor enhancements:

...

------------------------------------------------------------------------------

RubyGems installed the following executables:
        /Users/jules/tools/graalvm-ce-1.0.0-rc9/Contents/Home/jre/languages/ruby/bin/trufflegem
        /Users/jules/tools/graalvm-ce-1.0.0-rc9/Contents/Home/jre/languages/ruby/bin/trufflebundle

Ruby Interactive (ri) documentation was installed. ri is kind of like man 
pages for Ruby libraries. You may access it like this:
  ri Classname
  ri Classname.class_method
  ri Classname#instance_method
If you do not wish to install this documentation in the future, use the
--no-document flag, or set it as the default in your ~/.gemrc file. See
'gem help env' for details.

RubyGems system software updated
➜ ruby -v
truffleruby 1.0.0-rc9, like ruby 2.4.4, GraalVM CE Native [x86_64-darwin]
➜  gem -v
2.7.8

and this time, it worked...

I'll re-try tomorrow to make it fail with the -Xbacktraces.raise. It's a bit late here.

@eregon
Copy link
Member

eregon commented May 13, 2022

Very likely related to #2438.
A workaround is having a ~/.gemrc with gem: --no-document.
This is also the default, so now it just works and this is solved:

def self.platform_defaults
# disable documentation by default as it takes a significant amount of time for installing gems and is rarely used
{
'gem' => '--no-document'
}
end

@eregon eregon closed this as completed May 13, 2022
@eregon eregon added this to the 20.2.0 milestone May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants