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

bundler is broken in ruby image: /usr/local/lib/ruby/site_ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundler (Gem::GemNotFoundException) #194

Closed
atsaloli opened this issue Mar 7, 2018 · 5 comments
Labels
question Usability question, not directly related to an error with the image

Comments

@atsaloli
Copy link

atsaloli commented Mar 7, 2018

I'm not sure if this is related to #73 but I can't use bundler on ruby:latest

root@706ed8f6-fe4a-6eb2-93c7-fdc45af335cd:~/git/namer# docker run -ti --entrypoint bash ruby 
root@65bf395dd6ab:/# ruby -v
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]
root@65bf395dd6ab:/# bundler -v
Traceback (most recent call last):
        2: from /usr/local/bin/bundler:23:in `<main>'
        1: from /usr/local/lib/ruby/site_ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
/usr/local/lib/ruby/site_ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundler (Gem::GemNotFoundException)
root@65bf395dd6ab:/# gem list bundler

*** LOCAL GEMS ***

bundler (default: 1.16.1)
root@65bf395dd6ab:/# 
@atsaloli
Copy link
Author

atsaloli commented Mar 7, 2018

I tried to uninstall the Bundler gem, but:
a) bundler is not installed in GEM_HOME
b) it's still showing installed after I uninstall it:

root@65bf395dd6ab:/# gem list bundler

*** LOCAL GEMS ***

bundler (default: 1.16.1)
root@65bf395dd6ab:/# gem uninstall bundler
ERROR:  While executing gem ... (Gem::InstallError)
    bundler is not installed in GEM_HOME, try:
        gem uninstall -i /usr/local/lib/ruby/gems/2.5.0 bundler
root@65bf395dd6ab:/# gem uninstall -i /usr/local/lib/ruby/gems/2.5.0 bundler
Remove executables:
        bundle, bundler

in addition to the gem? [Yn]  Y
Removing bundle
Removing bundler
Successfully uninstalled bundler-1.16.1
root@65bf395dd6ab:/# gem list bundler

*** LOCAL GEMS ***

bundler (default: 1.16.1)
root@65bf395dd6ab:/# 

@tianon
Copy link
Member

tianon commented Mar 8, 2018

What is the bundler executable supposed to be for / do? bundle -v appears to work properly 😕

@atsaloli
Copy link
Author

atsaloli commented Mar 9, 2018

I don't know, @tianon. I was working through the training at http://container.training/ when this came up.

This is no longer pressing for me, as after changing the Dockerfile from FROM ruby to FROM ruby:2.1 I was able to get through the exercise.

Thanks!

@wglambert wglambert added the question Usability question, not directly related to an error with the image label Apr 25, 2018
@yosifkit
Copy link
Member

yosifkit commented May 15, 2018

It seems that this works in the most recent version. 😕 It seems that a new version of ruby fixed it (2.5.0p0 -> 2.5.1p57).

$ docker pull ruby
Using default tag: latest
latest: Pulling from library/ruby
cc1a78bfd46b: Already exists 
6861473222a6: Pull complete 
7e0b9c3b5ae0: Pull complete 
3ec98735f56f: Pull complete 
9b311b87a021: Pull complete 
598f3b74c68f: Pull complete 
7f4c0751f696: Pull complete 
2956d2d1f81e: Pull complete 
Digest: sha256:469d2c6b8bc6a96e59b528c8bd617d5d81b9089eeacb528681714fa4af002a8d
Status: Downloaded newer image for ruby:latest
$ docker run -it --rm ruby bash
root@c4d5efef7415:/# ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
root@c4d5efef7415:/# bundler -v
Bundler version 1.16.1
root@c4d5efef7415:/# bundle -v
Bundler version 1.16.1
root@c4d5efef7415:/# exit

@atsaloli
Copy link
Author

atsaloli commented Jun 9, 2018

Good to know, thanks, @yosifkit ! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

4 participants