[英]Bundle command not found Windows x64
I just installed ruby with the Heroku Toolbelt, probem is that when I do bundle install
it gives me this error:我刚刚使用 Heroku 工具带安装了 ruby,问题是当我进行
bundle install
时,它给了我这个错误:
sh.exe": /c/Program Files (x86)/ruby-1.9.3/bin/bundle: "c:/Program: bad interpreter: No such file or directory
Acording to this question Bundle command not found.根据这个问题找不到捆绑命令。 Bad Interpreter I should change the PATH, but I dont know how to do this, I have changed windows PATH enviorment variable, even changed to C:\ruby-1.9.2\bin I get a similar error:
Bad Interpreter我应该更改 PATH,但我不知道该怎么做,我更改了 windows PATH 环境变量,甚至更改为 C:\ruby-1.9.2\bin 我得到了类似的错误:
sh.exe": /c/ruby-1.9.3/bin/bundle: "c:/Program: bad interpreter: No such file or directory
When I try to reinstall the Toolbelt I change the install direcotry to c:\ but still the wizard install git and ruby folders at Program Files (x86) directory.当我尝试重新安装 Toolbelt 时,我将安装目录更改为 c:\ 但向导仍将 git 和 ruby 文件夹安装在 Program Files 目录(x86)
Any suggestions?有什么建议么?
You probably don't have the Bundler gem installed.您可能没有安装 Bundler gem。
Assuming you have Ruby installed:假设您安装了 Ruby:
gem install bundler
should do the trick.应该做的伎俩。
Well I found the solution, so I'm posting here.好吧,我找到了解决方案,所以我在这里发布。 Problem seems to be the bunlder installation in windows x64 machines, to solve this I did this.
问题似乎是 windows x64 机器中的 bunlder 安装,为了解决这个问题,我这样做了。
Copy the following directories to C:/将以下目录复制到C:/
C:\Program Files (x86)\Heroku C:\Program Files (x86)\Git C:\Program Files (x86)\ruby-1.9.2
Change windows environment "Path" variable, to do this right click Computer > Properties > Advance Settings > environment variables.更改 windows 环境“路径”变量,为此右键单击计算机 > 属性 > 高级设置 > 环境变量。 Path is under "System Variables" section.
路径位于“系统变量”部分下。 Edit them to this:
将它们编辑为:
C:\Heroku\bin;C:\ruby-1.9.2\bin;C:\git\bin;C:\git\cmd
C:\Heroku\bin;C:\ruby-1.9.2\bin;C:\git\bin;C:\git\cmd
Go to C:\ruby-1.9.2\bin and open the "bunlde" file with note pad (not the bundle.bat), change the first line from #:"c./Program Files (x86)/ruby-1.9.2/bin/ruby exe"##
to :#.c./ruby-1.9 2/bin/ruby exe##
Go 到 C:\ruby-1.9.2\bin 并使用记事本打开“bunlde”文件(不是 bundle.bat),将第一行从
#:"c./Program Files (x86)/ruby-1.9.2/bin/ruby exe"##
to :#.c./ruby-1.9 2/bin/ruby exe##
Now go to C:\Git and change the properties (right click > properties) of the Git Bash direct access, and change the target from C:\Windows\SysWOW64\cmd.exe /c ""C:\Program Files (x86)\Git\bin\sh.exe" --login -i"
to C:\Windows\SysWOW64\cmd.exe /c ""C:\Git\bin\sh.exe" --login -i"
Now go to C:\Git and change the properties (right click > properties) of the Git Bash direct access, and change the target from
C:\Windows\SysWOW64\cmd.exe /c ""C:\Program Files (x86)\Git\bin\sh.exe" --login -i"
到C:\Windows\SysWOW64\cmd.exe /c ""C:\Git\bin\sh.exe" --login -i"
Hope it helps someone希望它可以帮助某人
For Windows users:对于 Windows 用户:
I used gitbash to install bundler.我使用 gitbash 安装捆绑器。
gem install bundler
and the bundler was installed successfully.并且捆绑器已成功安装。 Even after that i was facing the same issue.
即使在那之后我也面临着同样的问题。
Found out that it was due to some permission issue in my case.发现这是由于我的情况下的一些许可问题。
Here is what i did:这是我所做的:
Hope this is helpful to anyone.希望这对任何人都有帮助。
I had these issues, and for me the only problem was the spaces in the file paths.我遇到了这些问题,对我来说唯一的问题是文件路径中的空格。 Simply adding 's around the path fixed the problem for me:
只需在路径周围添加 's 即可解决我的问题:
'C:\Program Files (x86)\git\bin';'C:\Program Files (x86)\Heroku\ruby-1.9.2\bin' 'C:\Program Files (x86)\git\bin';'C:\Program Files (x86)\Heroku\ruby-1.9.2\bin'
That's it而已
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.