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

rvm install of jruby fails with missing mvnw file #4793

Closed
hafizullah opened this issue Sep 21, 2017 · 13 comments
Closed

rvm install of jruby fails with missing mvnw file #4793

hafizullah opened this issue Sep 21, 2017 · 13 comments
Milestone

Comments

@hafizullah
Copy link

hafizullah commented Sep 21, 2017

Hi All, I am not an expert in using or setting up Jruby, just following a copy of the rvm_io.rvm1-ruby ansible role. The details of the issue I am facing are as follows:

Environment

Provide at least:

  • JRuby: jruby-1.7.16.1
  • rvm version: 1.29.2 (tried with 1.29.3 same result)
  • Operating system and platform: Linux jenkins 3.10.0-327.36.3.el7.x86_64 #1 SMP Mon Oct 24 16:09:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Expected Behavior

Running rvm install jruby-1.7.16.1 --auto-dotfiles --with-gems=bundler I expect jruby to be installed without any errors.

Actual Behavior

jenkins@jenkins ~]$ rvm install jruby-1.7.16.1 --auto-dotfiles --with-gems=bundler
Warning, new version of rvm available '1.29.3', you are using older version '1.29.2'.
You can disable this warning with:    echo rvm_autoupdate_flag=0 >> ~/.rvmrc
You can enable  auto-update  with:    echo rvm_autoupdate_flag=2 >> ~/.rvmrc
jruby-1.7.16.1 - #removing src/jruby-1.7.16.1..
Checking requirements for centos.
Requirements installation successful.
$JAVA_HOME was empty, setting up JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-1.b15.el7_2.x86_64, if it fails try setting JAVA_HOME to something sane and try again.
HEAD is now at 4e93f31 do not copy sources and javadocs into jruby-complete.jar
Previous HEAD position was 4e93f31... do not copy sources and javadocs into jruby-complete.jar
Switched to branch 'master'
From https://github.com/jruby/jruby
 * branch            master     -> FETCH_HEAD
Already up-to-date.
git checkout 1.7.16.1
Copying from repo to src path...
jruby-1.7.16.1 - #/var/lib/jenkins/rvm/src/jruby-1.7.16.1/mvnw.
Error running '/var/lib/jenkins/rvm/src/jruby-1.7.16.1/mvnw',
showing last 15 lines of /var/lib/jenkins/rvm/log/1505984296_jruby-1.7.16.1/mvnw.log
[2017-09-21 08:58:30] /var/lib/jenkins/rvm/src/jruby-1.7.16.1/mvnw
current path: /var/lib/jenkins/rvm/src/jruby-1.7.16.1
PATH=/usr/local/packer:/root/.nvm/versions/node/v8.5.0/bin:/usr/local/packer:/sbin:/bin:/usr/sbin:/usr/bin:/var/lib/jenkins/rvm/bin
command(1): /var/lib/jenkins/rvm/src/jruby-1.7.16.1/mvnw
/var/lib/jenkins/rvm/scripts/functions/utility_logging: line 210: /var/lib/jenkins/rvm/src/jruby-1.7.16.1/mvnw: No such file or directory

contents of the /var/lib/jenkins/rvm/log/1505984296_jruby-1.7.16.1/mvnw.log file:

 [2017-09-21 08:58:30] /var/lib/jenkins/rvm/src/jruby-1.7.16.1/mvnw
current path: /var/lib/jenkins/rvm/src/jruby-1.7.16.1
PATH=/usr/local/packer:/root/.nvm/versions/node/v8.5.0/bin:/usr/local/packer:/sbin:/bin:/usr/sbin:/usr/bin:/var/lib/jenkins/rvm/bin
command(1): /var/lib/jenkins/rvm/src/jruby-1.7.16.1/mvnw
/var/lib/jenkins/rvm/scripts/functions/utility_logging: line 210: /var/lib/jenkins/rvm/src/jruby-1.7.16.1/mvnw: No such file or directory

As far as I know the same version used to work fine and have not changed anything since to cause this. I just downgraded rvm version to make sure it was not RVM causing the issue.
Happy to raise this issue against rvm.io repo if here is not appropriate
any insight would be much appreciated.

@mkristian
Copy link
Member

@enebo could this be of the rescued tarball is missing the mvnw ?

@enebo
Copy link
Member

enebo commented Sep 21, 2017

@mkristian yeah I missed this one...my script did not iterate over these last point releases...Adding now.

@enebo
Copy link
Member

enebo commented Sep 21, 2017

This has been restored and works for me now.

@enebo enebo closed this as completed Sep 21, 2017
@hafizullah
Copy link
Author

hafizullah commented Sep 22, 2017

Thanks @enebo & @mkristian . After posting this issue, I switched to jruby-1.7.27 . I was able to proceed without issue.

@headius headius added this to the Non-Release milestone Nov 8, 2017
@jhandford
Copy link

jhandford commented Jul 16, 2018

@enebo @mkristian Can you check to make sure that you added the missing mvnw? Because I am getting the same exact issue that was previously reported with jruby-1.17.16.1

Here is my output:

M48619JHARDFOR:ruby jhandfor$ rvm install jruby-1.7.16.1
jruby-1.7.16.1 - #removing src/jruby-1.7.16.1..
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.13/x86_64/jruby-1.7.16.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Requirements installation successful.
HEAD is now at 4e93f31 do not copy sources and javadocs into jruby-complete.jar
remote: Counting objects: 73, done.
remote: Total 73 (delta 45), reused 45 (delta 45), pack-reused 28
Unpacking objects: 100% (73/73), done.
From https://github.com/jruby/jruby

  • [new branch] improve_kwargs -> origin/improve_kwargs
    7026bae..52bd002 master -> origin/master
    Previous HEAD position was 4e93f31... do not copy sources and javadocs into jruby-complete.jar
    Switched to branch 'master'
    Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
    (use "git pull" to update your local branch)
    From https://github.com/jruby/jruby
  • branch master -> FETCH_HEAD
    Updating 7026bae..52bd002
    Fast-forward
    maven/jruby/src/templates/hellowarld/Mavenfile | 2 +-
    rakelib/commands.rake | 2 +-
    rakelib/test.rake | 2 +-
    3 files changed, 3 insertions(+), 3 deletions(-)
    git checkout 1.7.16.1
    Copying from repo to src path...
    jruby-1.7.16.1 - #mvn.........
    Error running 'mvn',
    please read /Users/jhandfor/.rvm/log/1531752865_jruby-1.7.16.1/mvn.log

@enebo
Copy link
Member

enebo commented Jul 16, 2018

@jhandford which version are you seeing this problem with both 9.1.17.0 and 9.2.0.0 both seem to have a mvnw file?

@jhandford
Copy link

@enebo
I am not sure that I understand your question.

Below is my RVM Version. I am just running: rvm install jruby-1.7.16.1
rvm 1.29.4 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]

I know that jruby-1.7.27 works fine. However, my code set needs jruby-1.7.16.1/ Ruby 1.9.3 installed.

@enebo
Copy link
Member

enebo commented Jul 16, 2018

@jhandford oh I know what is up. Unfortunately, our S3 bucket was deleted again. The restoration does not include -src for 1.7.16.1 (and we don't have it). Also updated RVM know looks at maven instead of S3 (I don't know if this is for all versions of all versions later than 1.7.26. One of those two are your issue perhaps? You can still download -bin dist of 1.7.16.1 at: https://s3.amazonaws.com/jruby.org/downloads/1.7.16.1/jruby-bin-1.7.16.1.tar.gz

@jhandford
Copy link

Ahh thats it. Because I was like... rvm install jruby-1.7.16.1 was working 1 month ago. I hate that i removed it from my laptop.

I am not familiar with getting jruby installed from the bin dist. Do I just un-tar the file in my .rvm/rubies directory? Or is there more steps that I need to do? Here is where I have jruby-1.7.27 installed at:

M48619JHARDFOR:rubies jhandfor$ pwd
/Users/jhandfor/.rvm/rubies
M48619JHARDFOR:rubies jhandfor$ ls -ltr
total 0
lrwxr-xr-x 1 jhandfor CORP\Domain Users 40 Jul 11 17:05 default -> /Users/jhandfor/.rvm/rubies/jruby-1.7.27
drwxr-xr-x 11 jhandfor CORP\Domain Users 352 Jul 16 11:24 jruby-1.7.27
M48619JHARDFOR:rubies jhandfor$

@enebo
Copy link
Member

enebo commented Jul 16, 2018

@jhandford Yeah the tar can be unpacked into the rubies directory and you should be in business.

@jhandford
Copy link

jhandford commented Jul 16, 2018

@enebo Ok, I did that.... But I am assuming that there are some other steps that i need to do.
See below and the error message that I am getting:

M48619JHARDFOR:rubies jhandfor$ ls -ltr
total 63224
drwxr-xr-x@ 9 jhandfor CORP\Domain Users 288 Oct 28 2014 jruby-1.7.16.1
lrwxr-xr-x 1 jhandfor CORP\Domain Users 40 Jul 11 17:05 default -> /Users/jhandfor/.rvm/rubies/jruby-1.7.27
drwxr-xr-x 11 jhandfor CORP\Domain Users 352 Jul 16 11:24 jruby-1.7.27
-rw-r--r--@ 1 jhandfor CORP\Domain Users 32367197 Jul 16 12:28 jruby-bin-1.7.16.1.tar.gz
M48619JHARDFOR:rubies jhandfor$ rvm use jruby-1.7.16.1
Gemset '' does not exist, 'rvm jruby-1.7.16.1 do rvm gemset create ' first, or append '--create'.
M48619JHARDFOR:rubies jhandfor$

@enebo
Copy link
Member

enebo commented Jul 16, 2018

@jhandford I only have ~/rvm/gemsets/jruby/global.gems which contains:

jruby-openssl
jruby-launcher
gem-wrappers
rubygems-bundler
rake
rvm
bundler

I also notice I have ~/.rvm/gems/jruby-1.7.16.1@global -> /home/enebo/.rvm/rubies/jruby-1.7.16.1/lib/ruby/gems/shared. There is also a ~/.rvm/gems/jruby-1.7.16.1 which seems to almost have nothing in it (empty dirs) except for a wrappers directory which seems to have all the ./bin/* launcher scripts. Not sure if this is needed. I really thought unpacking would be enough. Sorry for the inconvenience :(

@jhandford
Copy link

@enebo Looks like I cant just untar the file and use with rvm.

My /Users/jhandfor/.rvm/gems directory doesnt have any reference to jruby-1.7.16.1

I am assuming that there is no way that you could just recreate your S3 bucket with the src so that I can just run rvm install jruby-1.7.16.1? :)

For now, I will try to manually point and create directories to reference the -bin distr files.

Any other suggestions, in case this doesnt work?

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

No branches or pull requests

5 participants