Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown ruby interpreter version (do not know how to handle): >=*. #4751

Open
katzer opened this issue Aug 8, 2019 · 16 comments
Open

Unknown ruby interpreter version (do not know how to handle): >=*. #4751

katzer opened this issue Aug 8, 2019 · 16 comments

Comments

@katzer
Copy link

katzer commented Aug 8, 2019

Description

I think this is more a feature request then a bug.

If RVM sees the ruby version constraint inside a Gemfile, it expects a fix version ("equals"). But there are many more possibilities - same like for gem.

Steps to reproduce

  1. Put ruby '>=2.5' into a Gemfile:
ruby '>=2.5'
source 'https://rubygems.org'
  1. Install ruby-2.6.3, but not ruby-2.5.x
  2. Switch into the directory where the Gemfile is located

Expected behavior

Since the Gemfile requests ruby '>=2.5' and ruby-2.6.3 is available, it should pick that version.

Actual behavior

Seems like RVM tries to load ruby with the version >=2.5.

Unknown ruby interpreter version (do not know how to handle): >=2.5.

Environment info

$ rvm info

ruby-2.6.3:

  system:
    uname:        "Darwin MacBerry.fritz.box 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64"
    name:         "OSX"
    version:      "10.14"
    architecture: "x86_64"
    bash:         "/bin/bash => GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18)"
    zsh:          "/opt/local/bin/zsh => zsh 5.7.1 (x86_64-apple-darwin18.2.0)"
    remote_path:  "osx/10.14/x86_64"
    xcode:        "10.3"

  rvm:
    version:      "1.29.9-next (master)"
    updated:      "27 minutes 43 seconds ago"
    path:         "/Users/sebastian/.rvm"
    autolibs:     "[enable] Allow RVM to use package manager if found, install missing dependencies, install package manager (only OS X)."

  ruby:
    interpreter:  "ruby"
    version:      "2.6.3p62"
    date:         "2019-04-16"
    platform:     "x86_64-darwin18"
    patchlevel:   "2019-04-16 revision 67580"
    full_version: "ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]"

  homes:
    gem:          "/Users/sebastian/.rvm/gems/ruby-2.6.3"
    ruby:         "/Users/sebastian/.rvm/rubies/ruby-2.6.3"

  binaries:
    ruby:         "/Users/sebastian/.rvm/rubies/ruby-2.6.3/bin/ruby"
    irb:          "/Users/sebastian/.rvm/rubies/ruby-2.6.3/bin/irb"
    gem:          "/Users/sebastian/.rvm/rubies/ruby-2.6.3/bin/gem"
    rake:         "/Users/sebastian/.rvm/gems/ruby-2.6.3/bin/rake"

  environment:
    PATH:         "/Users/sebastian/.rvm/gems/ruby-2.6.3/bin:/Users/sebastian/.rvm/gems/ruby-2.6.3@global/bin:/Users/sebastian/.rvm/rubies/ruby-2.6.3/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Users/sebastian/.sencha/Cmd:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/sebastian/.android/sdk/platform-tools:/Users/sebastian/.android/sdk/tools:/Users/sebastian/.android/sdk/tools/bin:/Users/sebastian/.rvm/bin:/Users/sebastian/Documents/appPlant/it-projects/orbit/orbit/bin/x86_64-apple-darwin17"
    GEM_HOME:     "/Users/sebastian/.rvm/gems/ruby-2.6.3"
    GEM_PATH:     "/Users/sebastian/.rvm/gems/ruby-2.6.3:/Users/sebastian/.rvm/gems/ruby-2.6.3@global"
    MY_RUBY_HOME: "/Users/sebastian/.rvm/rubies/ruby-2.6.3"
    IRBRC:        "/Users/sebastian/.rvm/rubies/ruby-2.6.3/.irbrc"
    RUBYOPT:      ""
    gemset:       ""
@fwolfst
Copy link
Member

fwolfst commented Nov 14, 2019

Related (at least for old RVMs): #3737

@abitrolly
Copy link

@mpapis in #3737 said

RVM 1.x can not support pessimistic version matching, it would require having ruby installed or other third party library.

I don't mind if RVM run a Ruby script for version matching with whatever version of Ruby it could find. It could also complain if Ruby is not found, that this version matching requires any Ruby to be already installed on the system.

@alexventuraio
Copy link

I got the same problem when trying to install Ruby 3.0.0:

user@server:~$ rvm use ruby --install --default 3.0.0
Unknown ruby interpreter version (do not know how to handle): 3.0.0.
user@server:~$ rvm use ruby --install 3.0.0
Unknown ruby interpreter version (do not know how to handle): 3.0.0.
user@server:~$ rvm install 3.0.0
Warning, new version of rvm available '1.29.12', you are using older version '1.29.10'.
You can disable this warning with:   echo rvm_autoupdate_flag=0 >> ~/.rvmrc
You can enable auto-update with:     echo rvm_autoupdate_flag=2 >> ~/.rvmrc
You can update manually with:        rvm get VERSION                         (e.g. 'rvm get stable')

Unknown ruby interpreter version (do not know how to handle): 3.0.0.
Already installed ruby-2.7.2.
To reinstall use:

    rvm reinstall ruby-2.7.2

Unknown ruby interpreter version (do not know how to handle): 3.0.0.

All I had to do was to run: rvm get stable to update my RVM version and then I was able to run:

rvm use ruby --install --default 3.0.0

@BirgitPohl
Copy link

The same as @alexventuraio

@MikePendo
Copy link

I have the same issue in my case the shell is hanging after cd or any other command in a folder where Gemfile exists
my default is 3.0.0. what should I doo win that case?

@alexventuraio
Copy link

I have the same issue in my case the shell is hanging after cd or any other command in a folder where Gemfile exists my default is 3.0.0. what should I doo win that case?

@MikePendo Can you paste any error or output you get?
I'm afraid your issues is something completely different to the topic in this post.

@MikePendo
Copy link

When trying to enter cocoapods directory
Unknown ruby interpreter version (do not know how to handle): >2.0.0.

system:
    uname:        "Darwin mr 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64 x86_64"
    name:         "OSX"
    version:      "12.6"
    architecture: "x86_64"
    bash:         "/bin/bash => GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin21)"
    zsh:          "/usr/local/bin/zsh => zsh 5.7.1 (x86_64-apple-darwin18.2.0)"
    remote_path:  "osx/12.6/x86_64"
    xcode:        "13.2.1"

  rvm:
    version:      "1.29.12 (latest)"
    updated:      "21 hours 45 minutes 36 seconds ago"
    path:         "/Users/mr/.rvm"
    autolibs:     "[4] Allow RVM to use package manager if found, install missing dependencies, install package manager (only OS X)."

  ruby:
    interpreter:  "ruby"
    version:      "3.0.0p0"
    date:         "2020-12-25"
    platform:     "x86_64-darwin20"
    patchlevel:   "2020-12-25 revision 95aff21468"
    full_version: "ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin20]"

  homes:
    gem:          "/Users/mr/.rvm/gems/ruby-3.0.0"
    ruby:         "/Users/mr/.rvm/rubies/ruby-3.0.0"

  binaries:
    ruby:         "/Users/mr/.rvm/rubies/ruby-3.0.0/bin/ruby"
    irb:          "/Users/mr/.rvm/rubies/ruby-3.0.0/bin/irb"
    gem:          "/Users/mrt/.rvm/rubies/ruby-3.0.0/bin/gem"
    rake:         "/Users/mr/.rvm/gems/ruby-3.0.0/bin/rake"

  environment:
    PATH:         "/Users/mr/.rvm/gems/ruby-3.0.0/bin:/Users//.rvm/gems/ruby-3.0.0@global/bin:/Users//.rvm/rubies/ruby-3.0.0/bin:/Users//Library/Android/sdk/platform-tools:/Users//Library/Android/sdk/:/Users//Library/Android/sdk/tools/bin:/Users//bin:/Users//Desktop/flutter/bin:/Users//Desktop/depotTools/depot_tools:/Users//.rvm/bin:/usr/local/bin:/usr/bin:/bin:/sbin:/usr/bin/python3:/Users//.nvm/versions/node/v15.3.0/bin:/usr/bin:/bin:/usr/sbin:/sbin:"
    GEM_HOME:     "/Users//.rvm/gems/ruby-3.0.0"
    GEM_PATH:     "/Users//.rvm/gems/ruby-3.0.0:/Users//.rvm/gems/ruby-3.0.0@global"
    MY_RUBY_HOME: "/Users//.rvm/rubies/ruby-3.0.0"
    IRBRC:        "/Users//.rvm/rubies/ruby-3.0.0/.irbrc"
    RUBYOPT:      ""
    gemset:       ""

I have tried all the default, stable rvm options ...

@alexventuraio
Copy link

@MikePendo I'm not sure what cocoapods is but I'll first make sure I have the latest RVM version and to have Ruby 2.0.0 installed through RVM.

@MikePendo
Copy link

@alexventuraio
installed the latest version of RVM the issue still persists.
tried to install ruby 2.0.0 (rvm install 2.0.0)

Error running '__rvm_make -j12',
please read /Users/michaelrozenblat/.rvm/log/1665416281_ruby-2.0.0-p648/make.log

There has been an error while running make. Halting the installation

make.log

thread.c:4835:20: note: did you mean 'rb_frame_this_func'?
./include/ruby/intern.h:369:4: note: 'rb_frame_this_func' declared here
ID rb_frame_this_func(void);
   ^
1 warning and 1 error generated.
make: *** [thread.o] Error 1
make: *** Waiting for unfinished jobs....
8 warnings generated.
94 warnings generated.
12 warnings generated.
6 warnings generated.
12 warnings generated.
+__rvm_make:0> return 2

@alexventuraio
Copy link

alexventuraio commented Oct 11, 2022

@MikePendo I'm not sure what kind of program or language you are working with, doesn't look like a Rails app.

But what I can see is that in your previous logs, you have a lot of /Users//.rvm/gems/ruby-3.0.0 which make me think that you are using the wrong Ruby version cause the make logs said that they are looking for Ruby 2.0.0.0. Maybe you should start making sure that you are using the correct version.

@MikePendo
Copy link

MikePendo commented Oct 11, 2022

@alexventuraio
The previous logs were with ruby3.0.0. The last logs (as u suggested here) to update RVM and to use the latest ruby 2.0.0 are showing 2.0.0.
The last log is from failing installation of ruby2.0.0 (I am not really understand why its failing)

@NishitTibicle
Copy link

NishitTibicle commented Apr 7, 2023

Not sure if it's recommended solution to fix this error or not but i was using ruby version in gem file like
ruby '~> 2.7.6' then i had change this to ruby '2.7.6' and it get fixed.

I know I have fix the version but anyone can suggest a better solution i would like to appreciate it

@alexventuraio
Copy link

Error running '__rvm_make -j12',
please read /Users/michaelrozenblat/.rvm/log/1665416281_ruby-2.0.0-p648/make.log

There has been an error while running make. Halting the installation

make.log

thread.c:4835:20: note: did you mean 'rb_frame_this_func'?
./include/ruby/intern.h:369:4: note: 'rb_frame_this_func' declared here
ID rb_frame_this_func(void);
   ^
1 warning and 1 error generated.
make: *** [thread.o] Error 1
make: *** Waiting for unfinished jobs....
8 warnings generated.
94 warnings generated.
12 warnings generated.
6 warnings generated.
12 warnings generated.
+__rvm_make:0> return 2

@MikePendo I'm not quite sure but I think all these errors are because Ruby 2.0.0 requires OpenSSL v1 to be installed with RVM and it is not installed in your system.

@latobibor
Copy link

latobibor commented Apr 12, 2023

Not sure if it's recommended solution to fix this error or not but i was using ruby version in gem file like
ruby '~> 2.7.6'

If it is a react-native app just like mine, you can do that fix, but this will create an upgrade conflict when you - say - upgrade from 0.71.x to 0.72.x. I'm also saying that this issue will gain traction as folks from react-native will start using rvm and they are going to run into this warning.

@glenpike
Copy link

glenpike commented Apr 17, 2023

I managed to resolve this by updating to latest rvm (was on 1.27.*) updated to 1.29.12
(I had to do this from the instructions on rvm.io because rvm update errored on GPG keys, but was missing one of the 'signing key numbers to import' in the output and importing the 2nd one from the instructions online seemed to resolve the updating)

@w1687021088
Copy link

Not sure if it's recommended solution to fix this error or not but i was using ruby version in gem file like
ruby '~> 2.7.6'

If it is a react-native app just like mine, you can do that fix, but this will create an upgrade conflict when you - say - upgrade from 0.71.x to 0.72.x. I'm also saying that this issue will gain traction as folks from react-native will start using rvm and they are going to run into this warning.

Hi, hello, I encountered this problem in the latest react-native version, how can I solve it? I passed rvm install 2.7.6 and ruby --version is 2.7.6, when the terminal still displays "Unknown ruby interpreter version (do not know how to handle): >=2.6.10." this paragraph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants