Skip to content

Unable to use bundler with jruby-complete for versions 1.7.21 and 9.0.0.0. 1.7.19 works as expected. #3186

@slawo-ch

Description

@slawo-ch

Installing the bundler gem, then invoking bundle yields a LoadError in jruby-complete 1.7.21 and 9.0.0.0

For the test case, consider the following bash script install-jruby, which fetches a given jruby version, installs the bundler gem and calls bundle init.

#!/bin/bash

JRUBY_VERSION="${1:-1.7.19}"

# bail on errors
set -e

# re-create clean test directory for given version
rm -rf "$JRUBY_VERSION"
mkdir -p "$JRUBY_VERSION"
cd "$JRUBY_VERSION"

echo "* Getting jruby $JRUBY_VERSION"
curl -o "jruby-complete-$JRUBY_VERSION.jar" "https://s3.amazonaws.com/jruby.org/downloads/$JRUBY_VERSION/jruby-complete-$JRUBY_VERSION.jar"

echo "* Creating gem_home"
mkdir gem_home


export PATH="gem_home/bin:$PATH" 
export GEM_HOME="gem_home" 
export GEM_PATH="gem_home" 

echo "* Installing bundler"
java -cp "jruby-complete-$JRUBY_VERSION.jar" org.jruby.Main -S gem install -i gem_home --no-rdoc --no-ri bundler

echo "* Listing installed gems"
java -cp "jruby-complete-$JRUBY_VERSION.jar" org.jruby.Main -S gem list

echo "* Calling bundle init"
java -cp "jruby-complete-$JRUBY_VERSION.jar" org.jruby.Main -S bundle init

echo "* Done"

I'm getting the following outputs when invoking the script for different versions of jruby:

1.7.19

$ ./install-jruby 1.7.19
* Getting jruby 1.7.19
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 21.4M  100 21.4M    0     0  2552k      0  0:00:08  0:00:08 --:--:-- 3375k
* Creating gem_home
* Installing bundler
Fetching: bundler-1.10.6.gem (100%)
Successfully installed bundler-1.10.6
1 gem installed
* Listing installed gems

*** LOCAL GEMS ***

bundler (1.10.6)
ffi (1.9.3 java)
jar-dependencies (0.1.2)
jruby-openssl (0.9.5 java)
json (1.8.0 java)
krypt (0.0.2)
krypt-core (0.0.2 universal-java)
krypt-provider-jdk (0.0.2)
rake (10.1.0)
rdoc (4.1.2)
* Calling bundle init
Writing new Gemfile to /Users/slawo/Desktop/jruby-complete-testcase/1.7.19/Gemfile
* Done

1.7.21

./install-jruby 1.7.21
* Getting jruby 1.7.21
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 22.5M  100 22.5M    0     0  2758k      0  0:00:08  0:00:08 --:--:-- 3325k
* Creating gem_home
* Installing bundler
Fetching: bundler-1.10.6.gem (100%)
Successfully installed bundler-1.10.6
1 gem installed
* Listing installed gems

*** LOCAL GEMS ***

bundler (1.10.6)
jar-dependencies (0.1.15)
jruby-openssl (0.9.7 java)
json (1.8.0 java)
rake (10.1.0)
rdoc (4.1.2)
* Calling bundle init
jruby: No such file or directory -- bundle (LoadError)

9.0.0.0

./install-jruby 9.0.0.0
* Getting jruby 9.0.0.0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 19.4M  100 19.4M    0     0  2802k      0  0:00:07  0:00:07 --:--:-- 3820k
* Creating gem_home
* Installing bundler
Fetching: bundler-1.10.6.gem (100%)
Successfully installed bundler-1.10.6
1 gem installed
* Listing installed gems

*** LOCAL GEMS ***

bundler (1.10.6)
jar-dependencies (0.1.15)
jruby-openssl (0.9.7 java)
json (1.8.0 java)
minitest (5.4.1)
power_assert (0.2.3)
psych (2.0.14.pre1 java)
rake (10.1.0)
rdoc (4.1.0)
test-unit (3.0.3)
* Calling bundle init
jruby: No such file or directory -- bundle (LoadError)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions