mise icon indicating copy to clipboard operation
mise copied to clipboard

Ruby plugin based on asdf is not compatible

Open megatux opened this issue 1 year ago • 2 comments

Describe the bug

Reinstalled the Ruby plugin. Ran bundle command from a new Rails app. (bundle is a command to install the libraries define in the Gemfile file) It fails with:

bundle
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
--- ERROR REPORT TEMPLATE -------------------------------------------------------

Errno::ENOENT: No such file or directory - asdf /Users/megatux/.local/share/rtx/plugins/ruby/rubygems-plugin/rubygems_plugin.rb:5:in ``' /Users/megatux/.local/share/rtx/plugins/ruby/rubygems-plugin/rubygems_plugin.rb:5:in install' /Users/megatux/.local/share/rtx/installs/ruby/3.3.0/lib/ruby/gems/3.3.0/gems/bundler-2.4.21/lib/bundler/installer.rb:89:in block in run'

Checking the file `rtx/plugins/ruby/rubygems-plugin/rubygems_plugin.rb` you see this code:

```ruby
module ReshimInstaller
  def install(options)
    super
    # We don't know which gems were installed, so always reshim.
    `asdf reshim ruby`
  end
end

if defined?(Bundler::Installer)
  Bundler::Installer.prepend ReshimInstaller
else
  Gem.post_install do |installer|
    # Reshim any (potentially) new executables.
    installer.spec.executables.each do |executable|
      `asdf reshim ruby #{RUBY_VERSION} bin/#{executable}`
    end
  end
  Gem.post_uninstall do |installer|
    # Unfortunately, reshimming just the removed executables or
    # ruby version doesn't work as of 2020/04/23.
    `asdf reshim ruby` if installer.spec.executables.any?
  end
end

It shows that it executes asdf reshim ruby and that's not compatible with rtx AFAIK.

Is there another Ruby plugin?

Expected behavior

blundle command should work fine.

rtx doctor output

(empty)

Additional context

  • Mac OSX, ARM64, zsh

megatux avatar Dec 29 '23 13:12 megatux

you just use the core plugin https://rtx.jdx.dev/lang/ruby.html

jdx avatar Jan 02 '24 00:01 jdx

Seems to be giving a 404 intermittently: https://mise.jdx.dev/lang/ruby.html example

ylluminate avatar Jan 24 '24 21:01 ylluminate