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 and Rails Command Destination not found #70

Open
ram3shyadav opened this issue Feb 13, 2016 · 29 comments
Open

Bundle and Rails Command Destination not found #70

ram3shyadav opened this issue Feb 13, 2016 · 29 comments
Assignees

Comments

@ram3shyadav
Copy link

Bundle and Rails command are not working from CMD in 64 bits v3.2.0. I checked the bat file in the ruby directory and found that you added the static file destination for the ruby.exe.
Please fix that.

@dacoinminster
Copy link

I think I have the same problem. When I try to install the latest version of rails on windows I get a rails.bat which looks thinks ruby.exe is at:.
"C:\Users\emachnic\GitRepos\railsinstaller-windows\stage\Ruby2.2.0\bin\ruby.exe"

I'm guessing "emachnic" is one of the devs that worked on this?

Installing the older version of RailsInstaller fixed this problem.

@emachnic emachnic self-assigned this Feb 16, 2016
@emachnic
Copy link
Contributor

I'm currently testing a new patch version.

@emachnic
Copy link
Contributor

I've got no idea why this is not working properly. For the time being, go ahead and reinstall the gems you need.

@sibinx7
Copy link

sibinx7 commented Feb 17, 2016

Change path in bundle.bat and rails.bat file. Thanks @anirudhy and @dacoinminster

@Velaseriat
Copy link

Just reinforcing what was already said.

running "bundle" or "rails" gives me the following:

C:\RailsInstaller\Ruby2.2.0\bin>rails
The system cannot find the path specified.

And as mentioned above, I also see "emachnic" in a filepath bundle.bat. Guessing this would only work on your machine.

Thank you,
Velaseriat

@nullnvoid
Copy link

Are there any plans to fix this?

RailsInstaller current Windows version is non functional when installed using the official package.

To help clarify, there are actually over a dozen batch files in the ruby2.2.0 bin folder that have hard coded paths to the stage folder on emachnic's personal pc.

@emachnic
Copy link
Contributor

@nullnvoid Please submit a patch. I have no idea how to fix this right now

@avdi
Copy link

avdi commented Mar 27, 2016

@emachnic I'm building RailsInstaller locally, and I can't repro the user-specific paths embedded in .bat files. For instance, my locally built stage/Ruby2.0.0/bin/bundle.bat contains:

@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
ECHO.This version of Ruby has not been built with support for Windows 95/98/Me.
GOTO :EOF
:WinNT
@"%~dp0ruby.exe" "%~dpn0" %*

Can you rebuild and see if you still have your home directory embedded in the bundle.bat and rails.bat files?

If you're still seeing the issue, then assuming I'm able to build the final .exe I'd be happy to submit it for testing and deployment as a replacement for the current broken build.

@avdi
Copy link

avdi commented Mar 27, 2016

Actually scratch that, I was on master. I do see the issue on the ruby2.2 branch.

@avdi
Copy link

avdi commented Mar 27, 2016

My guess now is that this has something to do with a differing behavior in RubyGems on windows between Ruby 2.0 and 2.2.

@jpmermoz
Copy link

jpmermoz commented Apr 9, 2016

Just search for every *.bat file inside the C:\RailsInstaller\Ruby2.2.0\bin folder which contains "emachnic" paths, and replace the whole content of them with this code:

@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
ECHO.This version of Ruby has not been built with support for Windows 95/98/Me.
GOTO :EOF
:WinNT
@"%~dp0ruby.exe" "%~dpn0" %*

@avdi
Copy link

avdi commented Apr 9, 2016

@jpmermoz the problem is that the files are generated this way during the build process. So it's going to crop up again with every build, until someone can get to the root of why the .bat files are generated that way.

@jpmermoz
Copy link

jpmermoz commented Apr 9, 2016

@avdi you're right.. I was just proposing a temporal solution for anyone having this issue after installing everything on windows

@emachnic
Copy link
Contributor

@jpmermoz If you reinstall the offending gems, it should fix the path automatically.

@avdi Do we think this could be an upstream issue, possibly with Rubygems itself? Trying to figure out where this behavior cropped up.

@avdi
Copy link

avdi commented Apr 11, 2016

I think it's likely a change in how RubyGems makes .bat stub files. I'm not ready to say it's bug, though. In the common case, generating stubs with hard-coded paths makes sense. I'm not sure they were ever intended to be redistributed like this.

@nullnvoid
Copy link

It looks like there's some kind of stage/production setting that has been
missed in the build process. Hard coding in the dev environment makes
sense...not for deployment though.

On 12 April 2016 at 08:47, Avdi Grimm [email protected] wrote:

I think it's likely a change in how RubyGems makes .bat stub files. I'm
not ready to say it's bug, though. In the common case, generating stubs
with hard-coded paths makes sense. I'm not sure they were ever intended to
be redistributed like this.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#70 (comment)

@avdi
Copy link

avdi commented Apr 12, 2016

I think the part that's unanticipated here is that binstub batch files
which are intended to be generated as part of final gem installation on a
specific system, are instead being bundled up and redistributed onto other
systems. I suspect the (reasonable) assumption that RubyGems makes is that
while a gem is redistributable, the files generated by gem install may
well be system and user-specific.
On Apr 11, 2016 8:40 PM, "nullnvoid" [email protected] wrote:

It looks like there's some kind of stage/production setting that has been
missed in the build process. Hard coding in the dev environment makes
sense...not for deployment though.

On 12 April 2016 at 08:47, Avdi Grimm [email protected] wrote:

I think it's likely a change in how RubyGems makes .bat stub files. I'm
not ready to say it's bug, though. In the common case, generating stubs
with hard-coded paths makes sense. I'm not sure they were ever intended to
be redistributed like this.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
<
#70 (comment)


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#70 (comment)

@Syntaf
Copy link

Syntaf commented Jun 15, 2016

Any updates on this? Trying to get into ruby on rails programming, but kinda tough when the go-to installer doesn't even work.

@Velaseriat
Copy link

If youre looking to get started, just go to an earlier version.

http://github.com/railsinstaller/railsintaller-windows/release

Just keep going backwards until you find a version that doesnt have this error.

And remember: https://gist.github.com/fnichol/867550

If youre just starting out, youre not gonna miss out on much by going to an earlier version.

@michael-wise
Copy link

This bug is often followed by the windows ssl cert problem, one or both of which prevent an alarming number of those wanting to learn rails from even starting. I'm sure there are many who turn away and never chime in anywhere. I hope these entry-barrier bugs soon receive the community attention they probably deserve. Unfortunately, it is out of mine and many others expertise. So please let's all pass this plea around to friends who know how to cook on Windows.

@avdi
Copy link

avdi commented Dec 8, 2016 via email

@emachnic
Copy link
Contributor

emachnic commented Dec 8, 2016 via email

@emachnic
Copy link
Contributor

Hi all, please download the latest version of RI with Ruby 2.2 and let me know if that resolves your issue.

@doubletap-dave
Copy link

@emachnic Still experiencing the same issue, had to edit rails.bat and bundle.bat in order to make this work. (This is with Ruby 2.3 on Windows 10 Enterprise - attempted install with elevated permissions)

@prusswan
Copy link

prusswan commented Feb 8, 2017

I just saw this when trying to upgrade my existing installation on Windows from Ruby 2.0 to 2.2. If the problem only lies with RailsInstaller but not RubyInstaller, then can I just install Ruby 2.2 using RubyInstaller?

The inferior/lack of Windows support is not good news, but RailsInstaller is still a popular tool for Windows users trying to learn Rails. Although, the advanced users will eventually move on to other platforms for more serious work.

@hkhatod
Copy link

hkhatod commented Feb 9, 2017

INstalled 2.2 version on windows 10 64bit. No issues!!!

@vitaly-rudenko
Copy link

Still relevant.

@kuolai
Copy link

kuolai commented Jul 6, 2017

Just replaced D:\RailsInstaller\Ruby2.3.0\bin*.bat with the patch. There are 17 files.
It took some time to cut and paste. The good news is it works and I am good to go.

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

16 participants