You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install 2 rubies with ruby-install, switch between them with chruby.
Let's assume Ruby 3.0.2 is the default, and a project requires 2.7.5
Start Nova from iTerm in a rails project (running on ruby 2.7.5) with nova . (I don't know if this step matters)
What I expected
No warnings in the Extension Console
What I got
Ruby Language Server[11:21:37.494000] [WARN] Warning: the running version of Bundler (2.2.22) is older than the version that created the lockfile (2.3.7). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.3.7`.
Ruby Language Server[11:21:37.494000] /Users/eirvandelden/.rubies/ruby-3.0.2/lib/ruby/3.0.0/bundler/resolver.rb:285:in `block in verify_gemfile_dependencies_are_found!': Could not find gem 'debug (>= 1.0.0)' in rubygems repository https://rubygems.org/ or installed locally. (Bundler::GemNotFound)
Ruby Language Server[11:21:37.494000] The source contains the following versions of 'debug': 0.1.0
Ruby Language Server[11:21:37.494000] from /Users/eirvandelden/.rubies/ruby-3.0.2/lib/ruby/3.0.0/bundler/resolver.rb:253:in `each'
Ruby Language Server[11:21:37.494000] from /Users/eirvandelden/.rubies/ruby-3.0.2/lib/ruby/3.0.0/bundler/resolver.rb:253:in `verify_gemfile_dependencies_are_found!'
Ruby Language Server[11:21:37.494000] from /Users/eirvandelden/.rubies/ruby-3.0.2/lib/ruby/3.0.0/bundler/resolver.rb:50:in `start'
Ruby Language Server[11:21:37.494000] from /Users/eirvandelden/.rubies/ruby-3.0.2/lib/ruby/3.0.0/bundler/resolver.rb:23:in `resolve'
Ruby Language Server[11:21:37.494000] from /Users/eirvandelden/.rubies/ruby-3.0.2/lib/ruby/3.0.0/bundler/definition.rb:286:in `resolve'
Ruby Language Server[11:21:37.494000] from /Users/eirvandelden/.rubies/ruby-3.0.2/lib/ruby/3.0.0/bundler/definition.rb:190:in `specs'
Ruby Language Server[11:21:37.494000] from /Users/eirvandelden/.rubies/ruby-3.0.2/lib/ruby/3.0.0/bundler/definition.rb:259:in `specs_for'
Ruby Language Server[11:21:37.494000] from -e:1:in `block in <main>'
Ruby Language Server[11:21:37.494000] from -e:1:in `chdir'
Ruby Language Server[11:21:37.494000] from -e:1:in `<main>'
Ruby Language Server[11:21:37.494000]
Ruby Language Server[11:21:37.494000] [WARN] Failed to load gems from bundle at /Users/eirvandelden/Sites/journal_administration/
Observations
Looking at the warning log, whatever is used for the Ruby Language Server (I guess that will be solar graph?) is being run in the wrong context. It is missing gems, because it is looking for them in my default ruby. But this project is running in a different ruby (2.7.5).
The text was updated successfully, but these errors were encountered:
With PR #17 up, I found out why I'm getting an error in #15:
/Users/eirvandelden/.gem/ruby/3.0.2/gems/bundler-2.3.10/lib/bundler/definition.rb:426:in `validate_ruby!': Your Ruby version is 3.0.2, but your Gemfile specified 2.7.5 (Bundler::RubyVersionMismatch)
from /Users/eirvandelden/.gem/ruby/3.0.2/gems/bundler-2.3.10/lib/bundler/definition.rb:401:in `validate_runtime!'
from /Users/eirvandelden/.gem/ruby/3.0.2/gems/bundler-2.3.10/lib/bundler.rb:145:in `setup'
from /Users/eirvandelden/.gem/ruby/3.0.2/gems/bundler-2.3.10/lib/bundler/setup.rb:20:in `block in <top (required)>'
from /Users/eirvandelden/.gem/ruby/3.0.2/gems/bundler-2.3.10/lib/bundler/ui/shell.rb:136:in `with_level'
from /Users/eirvandelden/.gem/ruby/3.0.2/gems/bundler-2.3.10/lib/bundler/ui/shell.rb:88:in `silence'
from /Users/eirvandelden/.gem/ruby/3.0.2/gems/bundler-2.3.10/lib/bundler/setup.rb:20:in `<top (required)>'
from <internal:/Users/eirvandelden/.rubies/ruby-3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/Users/eirvandelden/.rubies/ruby-3.0.2/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /Users/eirvandelden/Developer/reservations/config/boot.rb:3:in `<top (required)>'
from bin/rails:3:in `require_relative'
from bin/rails:3:in `<main>'
This is the same issue as above: my default ruby is 3.0.2, but the project is a different ruby version. The new processes that are spawned are run against the default ruby, not those defined in the project itself.
For the record, I'm using postmodern's chruby which uses bash to change ruby versions based on a .ruby-version file.
What I did
ruby-install
, switch between them withchruby
.3.0.2
is the default, and a project requires2.7.5
2.7.5
) withnova .
(I don't know if this step matters)What I expected
What I got
Observations
Looking at the warning log, whatever is used for the Ruby Language Server (I guess that will be solar graph?) is being run in the wrong context. It is missing gems, because it is looking for them in my default ruby. But this project is running in a different ruby (2.7.5).
The text was updated successfully, but these errors were encountered: