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

"No preset version installed" error while using mruby

Open ghost opened this issue 3 years ago • 7 comments

Complete log:

No preset version installed for command ruby2d
Please install a version by running one of the following:

asdf install ruby mruby-3.0.0

or add one of the following versions in your config file at /home/ashvith/Documents/ruby2d/.tool-versions
ruby 3.1.1

I've also tried asdf reshim, and even restarted my shell, but it won't work. One thing that I've noticed, is that when I start with a fresh installation of asdf-ruby, without any Ruby installed, it throws a build error. MRuby only builds when vanilla Ruby is installed.

ghost avatar Feb 28 '22 15:02 ghost

Hi @Ashvith , what command did you run that generated this output?

Are you sure you have installed and configured asdf correctly? Have you installed all dependencies for ruby and mruby on your system?

Can you provide the output of asdf info? Thanks!

Stratus3D avatar Mar 21 '22 12:03 Stratus3D

@Stratus3D this is the log from asdf-info

OS:
Linux fedora 5.16.15-201.fc35.x86_64 #1 SMP PREEMPT Thu Mar 17 05:45:13 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

SHELL:
GNU bash, version 5.1.8(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

ASDF VERSION:
v0.9.0-9ee24a3

ASDF ENVIRONMENT VARIABLES:
ASDF_DIR=/home/ashvith/.asdf

ASDF INSTALLED PLUGINS:
java                         https://github.com/halcyon/asdf-java.git master e0fdc17
nodejs                       https://github.com/asdf-vm/asdf-nodejs.git master 364c078
python                       https://github.com/danhper/asdf-python.git master 57a4d72
ruby                         https://github.com/asdf-vm/asdf-ruby.git master de49662
yarn                         https://github.com/twuni/asdf-yarn.git main 376c540

I am pretty sure that I have installed all the dependencies for both asdf and asdf-ruby.

ghost avatar Mar 21 '22 12:03 ghost

Hi @Ashvith , what command did you run that generated this output?

Can you provide the full sequence of commands and output that resulted in the issue you reported? I am not familiar with Fedora.

Stratus3D avatar Mar 21 '22 15:03 Stratus3D

Hi @Ashvith , what command did you run that generated this output?

Can you provide the full sequence of commands and output that resulted in the issue you reported? I am not familiar with Fedora.

  1. Install asdf and asdf-ruby.
  2. Execute asdf install ruby mruby-3.0.0
  3. Install ruby2d for mruby using gem install ruby2d
  4. Log prints on screen:
No preset version installed for command gem
Please install a version by running one of the following:

asdf install ruby mruby-3.0.0

or add one of the following versions in your config file at /home/ashvith/.tool-versions
ruby 3.1.1
ruby 2.7.5
ruby 3.0.3

ghost avatar Mar 21 '22 18:03 ghost

If after running asdf install ruby mruby-3.0.0 you do:

  • asdf reshim
  • gem install ruby2d

Does that change the output at all?

Also, what does asdf which gem output? Did you try any other version of mruby? I don't know much about mruby so I'd assume gem ships with it, but it might be good to verify.

Stratus3D avatar Mar 21 '22 19:03 Stratus3D

What I've noticed is that none of the binstubs (I'm assuming that's why they're called?) are working. Neither bundler, nor gem, the only exception being ruby and irb (there is another one called mruby but that one also probably does not work). I've tried irb, and except for a few basic operations, the rest of them do not work.

ghost avatar Mar 21 '22 20:03 ghost

@Ashvith correct me if I am wrong, but it doesn't appear that mruby 3.0.0 ships with gem or bundler. On my system all I see this:

$ ls ~/.asdf/installs/ruby/mruby-3.0.0/bin 
irb          mirb         mrbc         mruby        mruby-config mruby-strip  ruby

As such I don't think this is a bug with asdf-ruby.

Stratus3D avatar Mar 24 '22 18:03 Stratus3D