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
Describe the bug
There is a bug with RubyMine and Mise - RUBY-32547.
RubyMine patches RUBYLIB env variable when running tests. But it doesn't work with Mise, because Mise wipes RUBYLIB in the method get_pristine_env (src/env.rs:300), after applying remove RUBYLIB patch.
To Reproduce
Install RubyMine (2024.1 or later, even EAP versions).
Install mise 2024.7.1.
Run RubyMine from terminal using bash script.
Use sample rails project from the ticket RUBY-32547.
Run tests in users_controller_test.rb.
Get an exception like:
/bin/bash -c "export PATH=$PATH:/home/karinamokleva/.local/bin && /home/karinamokleva/.local/bin/mise exec --quiet ruby@3.3.0 -- /home/karinamokleva/.local/share/mise/installs/ruby/3.3.0/bin/ruby -x /home/karinamokleva/RubymineProjects/test_2024.1.1_preview_rails33/bin/bundle exec /home/karinamokleva/.local/share/mise/installs/ruby/3.3.0/bin/ruby -Itest /home/karinamokleva/Downloads/RubyMine-242.10148/plugins/ruby/rb/testing/runner/tunit_or_minitest_in_folder_runner.rb"
Testing started at 10:33 π.μ. ...
/home/karinamokleva/.local/share/mise/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require': cannot load such file -- teamcity/utils/runner_utils (LoadError)
from /home/karinamokleva/.local/share/mise/installs/ruby/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
from /home/karinamokleva/Downloads/RubyMine-242.10148/plugins/ruby/rb/testing/runner/tunit_or_minitest_in_folder_runner.rb:13:in `<main>'
Process finished with exit code 1
Additional context
When RubyMine run tests it patches RUBYLIB variable and adds there several paths. But Mise drop RUBYLIB completely. I debugged it to the method get_pristine_env (src/env.rs:300) in Mise repository and for some reason patches from __MISE_DIFF is
[
Remove(
"RUBYLIB",
),
]
which is wrong. Mise should preserve RUBYLIB patches to be able to work with RubyMine.
The text was updated successfully, but these errors were encountered:
Describe the bug
There is a bug with RubyMine and Mise - RUBY-32547.
RubyMine patches RUBYLIB env variable when running tests. But it doesn't work with Mise, because Mise wipes RUBYLIB in the method
get_pristine_env
(src/env.rs:300
), after applyingremove RUBYLIB
patch.To Reproduce
users_controller_test.rb
.Get an exception like:
Expected behavior
Tests run successfully.
mise doctor
outputAdditional context
When RubyMine run tests it patches RUBYLIB variable and adds there several paths. But Mise drop RUBYLIB completely. I debugged it to the method
get_pristine_env
(src/env.rs:300
) in Mise repository and for some reasonpatches
from__MISE_DIFF
iswhich is wrong. Mise should preserve RUBYLIB patches to be able to work with RubyMine.
The text was updated successfully, but these errors were encountered: