Skip to content

Instantly share code, notes, and snippets.

@andreaseger
Last active December 11, 2015 11:38
Show Gist options
  • Save andreaseger/4594672 to your computer and use it in GitHub Desktop.
Save andreaseger/4594672 to your computer and use it in GitHub Desktop.
Bundler.setup / bundle exec ignores platform
⮀ rm Gemfile.lock
⮀ rvm use jruby-1.7.2@test4 --create
Using /home/USER/.rvm/gems/jruby-1.7.2 with gemset test4
⮀ gem list
*** LOCAL GEMS ***
bouncy-castle-java (1.5.0146.1)
bundler (1.2.3)
jruby-launcher (1.0.15 java)
jruby-openssl (0.8.2)
rake (10.0.3)
rvm (1.11.3.5)
⮀ bundle install
Fetching git://github.com/sch1zo/jrb-libsvm.git
Fetching git://github.com/sch1zo/rb-libsvm.git
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Using jrb-libsvm (0.0.2) from git://github.com/sch1zo/jrb-libsvm.git (at master)
Using bundler (1.2.3)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
⮀ bundle list
Gems included by the bundle:
* bundler (1.2.3)
* jrb-libsvm (0.0.2 6000497)
⮀ ruby -e 'puts $:'
/home/USER/.rvm/rubies/jruby-1.7.2/lib/ruby/1.9/site_ruby
/home/USER/.rvm/rubies/jruby-1.7.2/lib/ruby/shared
/home/USER/.rvm/rubies/jruby-1.7.2/lib/ruby/1.9
⮀ bundle exec ruby -e 'puts $:'
/home/USER/.rvm/gems/jruby-1.7.2@test4/bundler/gems/jrb-libsvm-60004971fcfb/lib
/home/USER/.rvm/gems/jruby-1.7.2@global/gems/bundler-1.2.3/lib
/home/USER/.rvm/rubies/jruby-1.7.2/lib/ruby/1.9/site_ruby
/home/USER/.rvm/rubies/jruby-1.7.2/lib/ruby/shared
/home/USER/.rvm/rubies/jruby-1.7.2/lib/ruby/1.9
/home/USER/.rvm/gems/jruby-1.7.2@test4/bundler/gems/rb-libsvm-3c44acea06c2/lib
⮀ rm Gemfile.lock
⮀ rvm use ruby-1.9.3-p362@test4 --create
Using /home/USER/.rvm/gems/ruby-1.9.3-p362 with gemset test4
⮀ gem list
*** LOCAL GEMS ***
bundler (1.2.3)
rake (10.0.3)
rvm (1.11.3.5)
⮀ bundle install
Fetching git://github.com/sch1zo/rb-libsvm.git
remote: Counting objects: 755, done.
remote: Compressing objects: 100% (385/385), done.
remote: Total 755 (delta 380), reused 680 (delta 306)
Receiving objects: 100% (755/755), 134.81 KiB, done.
Resolving deltas: 100% (380/380), done.
Fetching git://github.com/sch1zo/jrb-libsvm.git
remote: Counting objects: 129, done.
remote: Compressing objects: 100% (90/90), done.
remote: Total 129 (delta 56), reused 99 (delta 26)
Receiving objects: 100% (129/129), 151.76 KiB, done.
Resolving deltas: 100% (56/56), done.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Using rb-libsvm (1.1.0) from git://github.com/sch1zo/rb-libsvm.git (at custom_stuff) with native extensions
Using bundler (1.2.3)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
⮀ bundle list
Gems included by the bundle:
* bundler (1.2.3)
* rb-libsvm (1.1.0 3c44ace)
⮀ ruby -e 'puts $:'
/home/USER/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1
/home/USER/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1/x86_64-linux
/home/USER/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby
/home/USER/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/vendor_ruby/1.9.1
/home/USER/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/vendor_ruby/1.9.1/x86_64-linux
/home/USER/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/vendor_ruby
/home/USER/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1
/home/USER/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/x86_64-linux
⮀ bundle exec ruby -e 'puts $:'
/home/USER/.rvm/gems/ruby-1.9.3-p362@test4/bundler/gems/jrb-libsvm-60004971fcfb/lib
/home/USER/.rvm/gems/ruby-1.9.3-p362@global/gems/bundler-1.2.3/lib
/home/USER/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1
/home/USER/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby/1.9.1/x86_64-linux
/home/USER/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/site_ruby
/home/USER/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/vendor_ruby/1.9.1
/home/USER/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/vendor_ruby/1.9.1/x86_64-linux
/home/USER/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/vendor_ruby
/home/USER/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1
/home/USER/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/x86_64-linux
/home/USER/.rvm/gems/ruby-1.9.3-p362@test4/bundler/gems/rb-libsvm-3c44acea06c2/lib
# A sample Gemfile
source "https://rubygems.org"
gem "jrb-libsvm", git: 'git://github.com/sch1zo/jrb-libsvm.git',
require: 'libsvm', platforms: :jruby
gem "rb-libsvm", git: 'git://github.com/sch1zo/rb-libsvm.git', branch: 'custom_stuff',
require: 'libsvm', platforms: :ruby
@andreaseger
Copy link
Author

is it correct that bundle exec add all gems to the loadpath disregarding the platforms and what bundle list says?

@indirect
Copy link

Platforms are pretty much broken ATM. :(

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