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
Fails with stringio gem #3860
Comments
I have the same problem with Ruby 2.7.1 and Bundler 1.17.3 on CIrcleCI with our Rails application.
But, actually bundler installed stringio v0.1.3 because I confirmed By the way, I made a Dockerfile to reproduce it. FROM rubylang/ruby:2.7.1-bionic
WORKDIR /work
RUN echo 'source "https://rubygems.org"; gem "csv", "3.1.6"' >> /work/Gemfile
# Specify install path
RUN bundle config set path /tmp/gems
# Install stringio to the global. `bundle install` installs stringio v0.1.3 without this line.
RUN gem install stringio:0.1.3
# It should install stirngio to /tmp/gems, but actually it doesn't.
RUN bundle install
RUN ls /tmp/gems/ruby/2.7.0/gems
# it raises an error
RUN bundle exec ruby -e 'Bundler.setup' $ docker build . --no-cache
Sending build context to Docker daemon 5.632kB
Step 1/8 : FROM rubylang/ruby:2.7.1-bionic
---> 694a7151c4f3
Step 2/8 : WORKDIR /work
---> Running in 2d0732303915
Removing intermediate container 2d0732303915
---> 51ef8b6acf21
Step 3/8 : RUN echo 'source "https://rubygems.org"; gem "csv", "3.1.6"' >> /work/Gemfile
---> Running in 43d380992242
Removing intermediate container 43d380992242
---> 7d6cf9dc7e8c
Step 4/8 : RUN bundle config set path /tmp/gems
---> Running in d11af8d35c56
Removing intermediate container d11af8d35c56
---> b7aa5890fc48
Step 5/8 : RUN gem install stringio:0.1.3
---> Running in 8987524acebb
Building native extensions. This could take a while...
Successfully installed stringio-0.1.3
1 gem installed
Removing intermediate container 8987524acebb
---> fde2e6fc381f
Step 6/8 : RUN bundle install
---> Running in 19524b6353fe
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using bundler 2.1.4
Using stringio 0.1.3
Fetching csv 3.1.6
Installing csv 3.1.6
Bundle complete! 1 Gemfile dependency, 3 gems now installed.
Bundled gems are installed into `/tmp/gems`
Removing intermediate container 19524b6353fe
---> c989884a652d
Step 7/8 : RUN ls /tmp/gems/ruby/2.7.0/gems
---> Running in 64277d2edf90
csv-3.1.6
Removing intermediate container 64277d2edf90
---> 773b32a3141b
Step 8/8 : RUN bundle exec ruby -e 'Bundler.setup'
---> Running in 088c5ee49f2b
/usr/local/lib/ruby/2.7.0/bundler/spec_set.rb:86:in `block in materialize': Could not find stringio-0.1.3 in any of the sources (Bundler::GemNotFound)
from /usr/local/lib/ruby/2.7.0/bundler/spec_set.rb:80:in `map!'
from /usr/local/lib/ruby/2.7.0/bundler/spec_set.rb:80:in `materialize'
from /usr/local/lib/ruby/2.7.0/bundler/definition.rb:170:in `specs'
from /usr/local/lib/ruby/2.7.0/bundler/definition.rb:237:in `specs_for'
from /usr/local/lib/ruby/2.7.0/bundler/definition.rb:226:in `requested_specs'
from /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:101:in `block in definition_method'
from /usr/local/lib/ruby/2.7.0/bundler/runtime.rb:20:in `setup'
from /usr/local/lib/ruby/2.7.0/bundler.rb:149:in `setup'
from /usr/local/lib/ruby/2.7.0/bundler/setup.rb:20:in `block in <top (required)>'
from /usr/local/lib/ruby/2.7.0/bundler/ui/shell.rb:136:in `with_level'
from /usr/local/lib/ruby/2.7.0/bundler/ui/shell.rb:88:in `silence'
from /usr/local/lib/ruby/2.7.0/bundler/setup.rb:20:in `<top (required)>'
from /usr/local/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
from /usr/local/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require' It is not the same error, but I guess it is a related problem. |
Lazily loading |
The change was reverted so I guess we can close it ruby/csv@e0c7074 |
I'd still like to lazily load |
Recently I updated
csv
gem in my project, that contains addingstringio
gem ruby/csv@09dd9f2The bundler fails with:
This error appears on Github Actions pipeline, but I cannot reproduce it locally.
I'm using Ruby 2.6.6 with newest bundler
2.1.4
The text was updated successfully, but these errors were encountered: