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
Platform-specific Gems not found in vendor/cache #3328
Comments
It seems this is caused by the version specific to the development platform being installed on the local machine, and the generic version as well as all other platform specific versions not being installed.
If someone points me in the right direction, I'm willing to create a patch. |
I posted a workaround here, in case it helps. |
Could you try #4022 and verify if it fixes this issue? |
I ran into this with a git-gem dependency that had native extensions. I manually ran |
That's great to hear @jdelStrother, I'm closing this then! |
Perhaps I'm not correctly installing Rubygems locally, but I think I'm still seeing the issue. Assuming the steps in the original description (above) have been followed to get to a failing state, then:
$ ruby setup.rb [11:43:12]
Successfully built RubyGem
Name: bundler
Version: 2.2.0.rc.2
File: bundler-2.2.0.rc.2.gem
Generating ctags for bundler-2.2.0.rc.2
ctags: Warning: cannot open source file "../../../../.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/bundler-2.2.0.rc.2/lib" : No such file or directory
Bundler 2.2.0.rc.2 installed
RubyGems 3.2.0.rc.29 installed
Regenerating binstubs
Regenerating plugins
Parsing documentation for rubygems-3.2.0.rc.29
Installing ri documentation for rubygems-3.2.0.rc.29
# ... [snip]
RubyGems installed the following executables:
/Users/sharman/.rbenv/versions/2.7.1/bin/gem
/Users/sharman/.rbenv/versions/2.7.1/bin/bundle
$ cd bundle_platform_error
$ rehash
$ gem --version
3.2.0.rc.29
$ bundle
Using bundler 2.2.0.rc.2
Using dumb_delegator 0.8.0
Using google-protobuf 3.7.1 (universal-darwin)
Updating files in vendor/cache
Could not find google-protobuf-3.7.1-x86_64-linux in any of the sources Am I testing this incorrectly? If not, could we re-open this issue? Thank you. |
@stevenharman Yes, your testing seems correct to me, and you're the original reporter whereas the issue that led me to close this was only partially related to yours, so it makes total sense to reopen 👍. I'll try to give this a closer look. |
@stevenharman I created #4042 which I believe should fix this. Could you verify it? |
@deivid-rodriguez ✅ Confirmed - this issue looks to be fixed with the changes in #4042. I'll close this issue once that PR is merged. Thank you! ❤️ |
Great!! Thanks for double checking! |
We have a dependency on
google-protobuf
, which has platform-specific gems for linux, macOS, and ruby. We alsobundle package
our gems so we can deploy w/o needing to hit RubyGems while building our images. We've attempted to configure bundler to cache all specified platform-specific gems so they're also updated via abundle update
.The initial
bundle install
works as expected - installs the gem and updates./vendor/cache
. But subsequentbundle install
,bundle package
, and other commands fail withCould not find <GEM> in any of the sources
. Interestingly, subsequentbundle update
works as expected.Minimal set of steps to reproduce
At this point we have an empty
./vendor/cache
and pretty much bareGemfile.lock
. Next we configure Bundler to cache all platform gems:Then, to make sure things work as expected, we add a non-platform specific gem:
All works well. The initial
bundle install
installed and cached the gem. A subsequentbundle install
used the existing install gems and updated the cache. Now we add a platform-specific gem:That worked. All three versions of the gem were cached, and our specific platform (macOS) was installed and used. Now we'll
bundle install
again and we expect a noop.It errors (with a return code of
7
), warningCould not find <GEM> in any of the sources
. However, we can verify the gems are in the./vendor/cache
:Interestingly a
bundle update
at this point does work, and exits happily:But subsequent command, like
bundle install
andbundle package
(at least), fail:Next steps?
I'm not sure where to take it from here. I doubt this is expected behavior, but would like to confirm.
Environment
Bundler Build Metadata
Bundler settings
Possibly Related Issues?
I've seen several other Issues reported, all seemingly around the area of package-specific gems. Perhaps related? Perhaps not. They are:
The text was updated successfully, but these errors were encountered: