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

.bat files in bin incorrectly use "jruby.bat.exe" instead of "jruby.exe", which causes file not found errors when executing in Windows #3772

Closed
ikakara opened this issue Apr 1, 2016 · 11 comments

Comments

@ikakara
Copy link

ikakara commented Apr 1, 2016

Running rake results in the following error:

'"..\bin\jruby.bat.exe"' is not recognized as an internal or external command, operable program or batch file.

This is because the batch file contains "jruby.bat.exe" instead of "jruby.exe"

ast works fine, but many of the other batch files are incorrect.

Environment

jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d Java HotSpot(TM) 64-Bit Server VM 25.74-b02 on 1.8.0_74-b02 +jit [Windows 10-amd64]

This issue also occurs in jruby version 1.7.24, and I imagine this bug is in other Windows versions as well.

Expected Behavior

Running rake should produce:
C:\jruby-9.0.5.0\bin>rake
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
C:\jruby-9.0.5.0\bin\rake:23:in `'
(See full trace by running task with --trace)

Actual Behavior

'"C:\jruby-9.0.5.0\bin\jruby.bat.exe"' is not recognized as an internal or external command, operable program or batch file.

@ikakara ikakara changed the title .bat files in bin incorrectly use "jruby.bat.exe" instead of "jruby.exe", which causes file not found errors when executing bin commands, from the command line .bat files in bin incorrectly use "jruby.bat.exe" instead of "jruby.exe", which causes file not found errors when executing bin commands in Windows Apr 1, 2016
@ikakara
Copy link
Author

ikakara commented Apr 1, 2016

There's an easy fix: replace all "jruby.bat.exe" with "jruby.exe" in all the batch files

@ikakara ikakara changed the title .bat files in bin incorrectly use "jruby.bat.exe" instead of "jruby.exe", which causes file not found errors when executing bin commands in Windows .bat files in bin incorrectly use "jruby.bat.exe" instead of "jruby.exe", which causes file not found errors when executing jruby/bin commands in Windows Apr 1, 2016
@ikakara ikakara changed the title .bat files in bin incorrectly use "jruby.bat.exe" instead of "jruby.exe", which causes file not found errors when executing jruby/bin commands in Windows .bat files in bin incorrectly use "jruby.bat.exe" instead of "jruby.exe", which causes file not found errors when executing in Windows Apr 1, 2016
@enebo
Copy link
Member

enebo commented Apr 1, 2016

@ikakara how are you installing JRuby on windows? And which .bat scripts do you see have jruby.bat.exe? I cannot find any reference to jruby.bat.exe. If I had to guess you built jruby locally and there is something wrong with out build scripts which is putting this into .bat generated files.

@ikakara
Copy link
Author

ikakara commented Apr 5, 2016

I'm using the download .exe(x64) installer.

@ikakara
Copy link
Author

ikakara commented Apr 5, 2016

http://jruby.org/download - choose either 9.0.5.0 or 1.7.24 Windows Executable (x64)

@ikakara
Copy link
Author

ikakara commented Apr 5, 2016

@enebo - the first thing I did was grep the source for "jruby.bat.exe", and didn't find anything. I didn't spend anytime trying to figure out how the different environments are built. Hence I reported a bug, and let you guys figure it out :)

@enebo
Copy link
Member

enebo commented Apr 5, 2016

@ikakara ok. That was a random guess. I installed exe 64 bit on win7 and I am not seeing this issue. I wonder if it involves something with Win10. I am grasping at straws :)

@ikakara
Copy link
Author

ikakara commented Apr 5, 2016

Let me uninstall and reinstall.... Is there a difference with .exe and zip installations?

@enebo
Copy link
Member

enebo commented Apr 6, 2016

@ikakara .zip is mostly the same but the installer does extra stuff like install a program group for start menu and setup a path for you. I would be interested in seeing if you have the same issue with the .zip version though.

@ikakara
Copy link
Author

ikakara commented Apr 7, 2016

So the zip file contains windows .bat files w/ the correct info:
@echo OFF
@"%~dp0jruby.exe" -S rake %*

I'll double check the windows (x64) installation ...

@ikakara
Copy link
Author

ikakara commented Apr 7, 2016

Well, I can't seem to reproduce the installation problem. I do have bin directories w/ the wrong .bat files. But when I reinstall w/ the same installation executables, the installation looks good.

Anyway, I don't know what happened - I guess we'll see if anyone encounters this issue, and try to further deduce when it happens again.

@enebo enebo added this to the Invalid or Duplicate milestone Apr 8, 2016
@enebo
Copy link
Member

enebo commented Apr 8, 2016

@ikakara ok. I will close but if we see this again I will link the issues together.

@enebo enebo closed this as completed Apr 8, 2016
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

2 participants