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

GemWrappers: Can not wrap not executable file: x/y/z/.../xx.lock #16

Open
honood opened this issue Sep 3, 2024 · 6 comments
Open

GemWrappers: Can not wrap not executable file: x/y/z/.../xx.lock #16

honood opened this issue Sep 3, 2024 · 6 comments

Comments

@honood
Copy link

honood commented Sep 3, 2024

After installing Ruby 3.3.5, I got the following many warning messages like the following when updating or installing gems:

GemWrappers: Can not wrap not executable file: /Users/Me/.rvm/gems/ruby-3.3.5/bin/ri.lock
GemWrappers: Can not wrap not executable file: /Users/Me/.rvm/gems/ruby-3.3.5/bin/racc.lock
GemWrappers: Can not wrap not executable file: /Users/Me/.rvm/gems/ruby-3.3.5/bin/rdoc.lock
GemWrappers: Can not wrap not executable file: /Users/Me/.rvm/gems/ruby-3.3.5/bin/rdbg.lock
GemWrappers: Can not wrap not executable file: /Users/Me/.rvm/gems/ruby-3.3.5/bin/rbs.lock
GemWrappers: Can not wrap not executable file: /Users/Me/.rvm/gems/ruby-3.3.5/bin/typeprof.lock
GemWrappers: Can not wrap not executable file: /Users/Me/.rvm/gems/ruby-3.3.5/bin/rake.lock
GemWrappers: Can not wrap not executable file: /Users/Me/.rvm/gems/ruby-3.3.5/bin/erb.lock
GemWrappers: Can not wrap not executable file: /Users/Me/.rvm/gems/ruby-3.3.5/bin/irb.lock
GemWrappers: Can not wrap not executable file: /Users/Me/.rvm/gems/ruby-3.3.5/bin/ri.lock
GemWrappers: Can not wrap not executable file: /Users/Me/.rvm/gems/ruby-3.3.5/bin/racc.lock

The installed gem-wrapper is 1.4.0.

@RemcodM
Copy link

RemcodM commented Sep 5, 2024

I presume the .lock files do not need any gem wrapper. I found the output so much distracting that I temporarily commented out the warning message:

sed -i "s/warn \"GemWrappers: Can not wrap not executable file: #{target_path}\"/# warn \"GemWrappers: Can not wrap not executable file: #{target_path}\"/g" ~/.rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/gem-wrappers-1.4.0/lib/gem-wrappers/installer.rb

Obviously, a more proper fix would be to ignore the lock files somehow.

@bvogel
Copy link

bvogel commented Sep 5, 2024

I went a even more drastic way, as I don't need wrappers, and I surely hadn't installed the wrapper gem manually so it must have been installed by rvm, I just ended uninstalling it:

gem uninstall -i ~/.rvm/rubies/ruby-3.3.5/lib/ruby/gems/3.3.0 gem-wrappers

@roberts1000
Copy link

roberts1000 commented Sep 18, 2024

RubyGems 3.5.19 and Bundler 2.5.19 remove the .lock files that trigger the warnings from GemWrappers.

@martinbarilik
Copy link

RubyGems 3.5.19 and Bundler 2.5.19 remove the .lock files that trigger the warnings from GemWrappers.

didn't fix the problem for me ...

$debian: bundler -v
Bundler version 2.5.19
$debian: gem -v
3.5.19
$debian: gem install ruby-lsp -v 0.18
Fetching ruby-lsp-0.18.0.gem
GemWrappers: Can not wrap not executable file: /home/.../bin/irb.lock
GemWrappers: Can not wrap not executable file: /home/.../bin/rdoc.lock
GemWrappers: Can not wrap not executable file: /home.../bin/ri.lock
Successfully installed ruby-lsp-0.18.0
Parsing documentation for ruby-lsp-0.18.0
Installing ri documentation for ruby-lsp-0.18.0
Done installing documentation for ruby-lsp after 0 seconds
1 gem installed

@roberts1000
Copy link

@martinbarilik I'd let RubyGems know there's still an issue. After a very quick read through of the code, I don't think this is a problem with GemWrappers - it's just warning that it's seeing unexpected files.

If anyone else is having this issue, the fix seems to be to get the .lock files removed. If you're still having trouble, a workaround is to manually remove the .lock files, in the directory that is reported in the warning.

@ekortright-ewtn
Copy link

@martinbarilik I'd let RubyGems know there's still an issue. After a very quick read through of the code, I don't think this is a problem with GemWrappers - it's just warning that it's seeing unexpected files.

If anyone else is having this issue, the fix seems to be to get the .lock files removed. If you're still having trouble, a workaround is to manually remove the .lock files, in the directory that is reported in the warning.

Removing the .lock files eliminated the warnings for me. Thanks.

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

6 participants