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

Asdf do not create shim for rbs on ruby 2.6/2.7

Open hurricup opened this issue 4 years ago • 1 comments

Asdf and ruby plugin the most recent version. To reproduce:

  1. Install ruby 2.6.8
  2. Run console
  3. Switch to ruby 2.6.8: asdf shell ruby 2.6.8
  4. Create a Gemfile:
source 'https://rubygems.org'
gem 'rbs'
  1. Run bundle install
ser@4b2cd6c41c63:~/tmp$ bundle install
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using bundler 1.17.2
Fetching rbs 1.5.1
Installing rbs 1.5.1
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
  1. Try to run rbs
user@4b2cd6c41c63:~/tmp$ rbs
grep: ruby 3.0.2
ruby system: No such file or directory
No preset version installed for command rbs
Please install a version by running one of the following:

asdf install ruby 2.6.8

or add one of the following versions in your config file at 
ruby 3.0.2
  1. Run asdf reshim
  2. Run rbs
user@4b2cd6c41c63:~/.tmp$ asdf reshim
user@4b2cd6c41c63:~/.tmp$ rbs
Usage: rbs [options...] [command...]

Available commands: ast, list, ancestors, methods, method, validate, constant, paths, prototype, vendor, parse, test, version, help.

Options:
    -r LIBRARY                       Load RBS files of the library
    -I DIR                           Load RBS files from the directory
        --no-stdlib                  Skip loading standard library signatures
        --repo DIR                   Add RBS repository
        --log-level LEVEL            Specify log level (defaults to `warn`)
        --log-output OUTPUT          Specify the file to output log (defaults to stderr)

hurricup avatar Aug 25 '21 09:08 hurricup

It seems like the code in https://github.com/asdf-vm/asdf-ruby/blob/master/bin/exec-env wasn't run. Have you altered your $RUBYLIB env variable in any way?

It may be that some code in https://github.com/asdf-vm/asdf-ruby/blob/master/rubygems-plugin/rubygems_plugin.rb isn't working in Ruby 2.6.8.

Stratus3D avatar Sep 08 '21 16:09 Stratus3D

Closing due to lack of a response.

Stratus3D avatar Mar 20 '24 18:03 Stratus3D