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

bundle package: Could not find <GEM> in any of the sources #3361

Closed
momolog opened this issue Jun 29, 2018 · 4 comments · Fixed by #4022
Closed

bundle package: Could not find <GEM> in any of the sources #3361

momolog opened this issue Jun 29, 2018 · 4 comments · Fixed by #4022

Comments

@momolog
Copy link

momolog commented Jun 29, 2018

I am trying to bundle and package for two platforms (ruby-2.3.7 and jruby-9.1.17.0)

This is my Gemfile:

source 'https://rubygems.org'
gem 'pg_array_parser', git: 'https://github.com/kares/pg_array_parser'

These are the commands I issue:

rm -rf vendor Gemfile.lock .bundle

rvm use jruby-9.1.17.0
bundle

rvm use 2.3.7
bundle
bundle lock --add_platform java
bundle package --all --all-platforms

Everything works fine until the last line (bundle package --all --all-platforms).

I expect the last command to work and vendor the pg_array_parser gem for both platforms. Instead this is what I am getting:

Using bundler 1.16.2
Using pg_array_parser 0.0.9 from https://github.com/kares/pg_array_parser (at master@bad0cad)
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Updating files in vendor/cache
Could not find pg_array_parser-0.0.9-java in any of the sources

This looks like a bug in bundler to me. Or am I missing anything?


This is the output of bundle env:

Environment

Bundler             1.16.2
  Platforms         ruby, x86_64-darwin-17
Ruby                2.3.7p456 (2018-03-28 revision 63024) [x86_64-darwin17]
  Full Path         /Users/alexander/.rvm/rubies/ruby-2.3.7/bin/ruby
  Config Dir        /Users/alexander/.rvm/rubies/ruby-2.3.7/etc
RubyGems            2.7.7
  Gem Home          /Users/alexander/.rvm/gems/ruby-2.3.7
  Gem Path          /Users/alexander/.rvm/gems/ruby-2.3.7:/Users/alexander/.rvm/gems/ruby-2.3.7@global
  User Path         /Users/alexander/.gem/ruby/2.3.0
  Bin Dir           /Users/alexander/.rvm/gems/ruby-2.3.7/bin
Tools
  Git               2.17.1
  RVM               1.29.3 (master)
  rbenv             not installed
  chruby            not installed
  rubygems-bundler  (1.4.4)

Bundler Build Metadata

Built At          2018-06-29
Git SHA
Released Version  false

Bundler settings

specific_platform
  Set for the current user (/Users/alexander/.bundle/config): true
cache_all_platforms
  Set for your local app (/Users/alexander/projects/test/.bundle/config): true
cache_all
  Set for your local app (/Users/alexander/projects/test/.bundle/config): true

Gemfile

Gemfile

source 'https://rubygems.org'

gem 'pg_array_parser', git: 'https://github.com/kares/pg_array_parser'

Gemfile.lock

GIT
  remote: https://github.com/kares/pg_array_parser
  revision: bad0cad48b70ec9a6e4f67452384d4f72813b646
  specs:
    pg_array_parser (0.0.9)
    pg_array_parser (0.0.9-java)

GEM
  remote: https://rubygems.org/
  specs:

PLATFORMS
  java
  ruby
  universal-java-1.8
  x86_64-darwin-17

DEPENDENCIES
  pg_array_parser!

BUNDLED WITH
   1.16.2
@momolog momolog changed the title Gems seem to be missing from your vendor/cache directory Could not find <GEM> in any of the sources Jun 29, 2018
@momolog momolog changed the title Could not find <GEM> in any of the sources bundle package: Could not find <GEM> in any of the sources Jun 29, 2018
@rgaufman
Copy link

Did you ever solve the problem?

@deivid-rodriguez
Copy link
Member

I can reproduce this, it's due specific_platform setting making it fail, so as a workaround you could remove that setting.

I'll try to find some time to investigate it.

@rgaufman
Copy link

I solved my problem by completely re-installing Ruby, not sure what the cause was.

@deivid-rodriguez
Copy link
Member

I created #4022 that should fix this issue. Appreciated if you give it a try and let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants