rvm / gem-wrappers

Create gem wrappers for easy use of gems in cron and other system locations.
Other
14 stars 4 forks source link

Wrappers plugin erroring with Rubygems >= 3.2.x #14

Closed jasonadamyoung closed 3 years ago

jasonadamyoung commented 3 years ago

As part of a Dockerfile build for a rails application that I have I'm doing the following to create a gemset for the application:

#!/bin/bash
/usr/local/rvm/bin/rvm @global do gem update --system
/usr/local/rvm/bin/rvm @global do gem update bundler --force
/usr/local/rvm/bin/rvm alias create default 2.6.6@webapp --create

I hadn't rebuilt in a few months (pre-Rubygems 3.2.x) - and builds started throwing errors yesterday with:

root@d28956e202b0:/# /usr/local/rvm/bin/rvm alias create default 2.6.6@webapp --create
Error running 'run_gem_wrappers regenerate',
please read /usr/local/rvm/log/1609161682_ruby-2.6.6/gemset.wrappers.webapp.log
Creating alias default for ruby-2.6.6@webapp.....

The core error in the log was:

[2020-12-28 13:21:22] run_gem_wrappers
run_gem_wrappers ()
{
    gem_install gem-wrappers > /dev/null && gem wrappers "$@" || return $?
}
current path: /
GEM_PATH=/usr/local/rvm/gems/ruby-2.6.6@webapp:/usr/local/rvm/gems/ruby-2.6.6@global
GEM_HOME=/usr/local/rvm/gems/ruby-2.6.6@webapp
PATH=/usr/local/rvm/gems/ruby-2.6.6@webapp/bin:/usr/local/rvm/gems/ruby-2.6.6@global/bin:/usr/local/rvm/rubies/ruby-2.6.6/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
command(2): run_gem_wrappers regenerate
[...]
+ gem wrappers regenerate
ERROR:  While executing gem ... (Gem::CommandLineError)
    Unknown command wrappers
+ return 1

gem-wrappers was present in all of the gem lists for rvm.

I ended up finding Rubygems#4204 - and particular this comment that gem-wrappers may no longer be working properly with the Rubygems plugin system rewrite

I don't have a more detailed bug report at this time, but wanted to get an issue open and whatever eyes you need on it, as I'd imagine these initial reports are canaries in the coal mine.

pedrofurtado commented 3 years ago

Link: https://github.com/rvm/rvm/issues/5020

pedrofurtado commented 3 years ago

I think this issue can be closed, right? Because it is solved in https://github.com/rvm/rvm/issues/5020 🤝

jasonadamyoung commented 3 years ago

Yep - it could be closed anyway since it didn't belong here in the end. But I finally tested the latest Rubygems with my Docker build - and it's good to go.

Thanks @pedrofurtado for pushing this through in the other projects!

pedrofurtado commented 3 years ago

@jasonadamyoung 🤝