asdf-ruby icon indicating copy to clipboard operation
asdf-ruby copied to clipboard

`gem install yarn` installs it in ~/.rvm/gems/ where it isn't seen by ruby

Open wwalker opened this issue 5 years ago • 2 comments

Fedora 32 No system ruby at all. No rvm on my system at all.

Steps to reproduce:

From scratch:

248208  2020-09-27 16:16:14 - git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.0
248209  2020-09-27 16:16:21 - cd .asdf
248215  2020-09-27 16:18:14 - asdf plugin-add ruby
248219  2020-09-27 16:19:11 - asdf list-all ruby
248223  2020-09-27 16:21:40 - asdf install ruby 2.7.1
248224  2020-09-27 16:24:19 - asdf global ruby 2.7.1
248289  2020-09-27 16:25:32 - gem install yarn
@2020-09-27 20:18:07 wwalker@polonium:~ ✘ $ ls -l ~/.rvm
ls: cannot access '/home/wwalker/.rvm': No such file or directory
@2020-09-27 20:18:17 wwalker@polonium:~ ✘ $ which gem
~/.asdf/shims/gem
@2020-09-27 20:18:26 wwalker@polonium:~ ✓ $ which ruby
~/.asdf/shims/ruby
@2020-09-27 20:18:32 wwalker@polonium:~ ✓ $ gem install yarn
Fetching yarn-0.1.1.gem
Fetching trollop-2.9.10.gem
Fetching parslet-2.0.0.gem
Fetching rack-2.2.3.gem
Successfully installed rack-2.2.3
!    The 'trollop' gem has been deprecated and has been replaced by 'optimist'.
!    See: https://rubygems.org/gems/optimist
!    And: https://github.com/ManageIQ/optimist
Successfully installed trollop-2.9.10
Successfully installed parslet-2.0.0
Successfully installed yarn-0.1.1
Parsing documentation for rack-2.2.3
Installing ri documentation for rack-2.2.3
Parsing documentation for trollop-2.9.10
Installing ri documentation for trollop-2.9.10
Parsing documentation for parslet-2.0.0
Installing ri documentation for parslet-2.0.0
Parsing documentation for yarn-0.1.1
Installing ri documentation for yarn-0.1.1
Done installing documentation for rack, trollop, parslet, yarn after 4 seconds
4 gems installed
@2020-09-27 20:19:36 wwalker@polonium:~ ✓ $ ls -l ~/.rvm
total 4
drwxr-xr-x 3 wwalker wwalker 4096 2020-09-27T20:19:31.538541333 gems

Verification that there is no rvm on the machine:

@2020-09-27 20:12:38 wwalker@polonium:~ ✓ $ sudo updatedb
@2020-09-27 20:13:39 wwalker@polonium:~ ✓ $ locate -i rvm | egrep -v '/ssd/luks-SSD960GB/old-(home|root)' | grep -v ^/home/wwalker/.rvm-disabled | egrep -v '[./](rvm.py|rvm.rst)' | grep -i '\<rvm\>'
/home/wwalker/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/rake-13.0.1/.github/workflows/ubuntu-rvm.yml
/home/wwalker/.vscode/extensions/korekontrol.saltstack-0.0.8/snippets/rvm.json
/home/wwalker/Projects/upstream/appliance/pkgs/thirdparty-oss/ancient-ruby/rvm-patchsets.nix
/usr/lib/python3.8/site-packages/salt/modules/__pycache__/rvm.cpython-38.opt-1.pyc
/usr/lib/python3.8/site-packages/salt/modules/__pycache__/rvm.cpython-38.pyc
/usr/lib/python3.8/site-packages/salt/states/__pycache__/rvm.cpython-38.opt-1.pyc
/usr/lib/python3.8/site-packages/salt/states/__pycache__/rvm.cpython-38.pyc
@2020-09-27 20:13:41 wwalker@polonium:~ ✓ $ 

wwalker avatar Sep 28 '20 01:09 wwalker

Strange. No idea what is going on. asdf-ruby doesn't do anything with rvm either.

Stratus3D avatar Sep 28 '20 13:09 Stratus3D

OK, I found out what was going on ( thanks !! to shoshin on freenode#ruby )

I deleted everything RVM from the machine, EXCEPT all the crap rvm had put in the shell as functions and env vars!!!

Maybe add to the README or somewhere :

### Migrating from RVM:
Make certain that you remove ALL of rvm.  It is tenacious.
* `rm -rf .rvm`
* Check all these files for remnants of `rvm`

grep -i rvm .bashrc .bashrc.local .bash_profile .profile .mkshrc .zlogin .zshrc

* **_NOW REBOOT_** to get all the functions and env vars that have rvm in them out of your environment
  * `( set | env ) | grep -i rvm` will show invasive it is

wwalker avatar Sep 28 '20 20:09 wwalker

@wwalker can you take a look at https://github.com/asdf-vm/asdf-ruby/pull/306?

Stratus3D avatar Oct 04 '22 17:10 Stratus3D

@Stratus3D thank you, I made my comments there. It looks good and is well worded.

wwalker avatar Oct 05 '22 02:10 wwalker