当Aptana创建一个新的Rails项目时,会出现以下消息:
sh: /c/RailsInstaller/Ruby1.9.2/bin/rails: C:/Projects/railsinstaller/stage/Ruby1.9.2/bin/ruby.exe: bad interpreter: No such file or directory在rails ruby/bin文件夹中有一个用于RailsInstaller的bat文件(Rails.bat),其中包含:
@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
@"ruby.exe" "C:/Projects/railsinstaller/stage/Ruby1.9.2/bin/rails" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@"ruby.exe" "%~dpn0" %*可以在没有Aptana的情况下创建新的Rails项目,但是使用它或在其终端中键入rails会产生错误。
The "C:/Projects/railsinstaller/stage/Ruby1.9.2/bin" directoty doesn´t exists, so I´he changed all bat files to the correct one, plus I´m on Win7, so the code shound´t be running after all. That wrong dir is RailsINstaller problem, but after correcting it, Aptana still doesn´t work.ruby/bin在我的PATH变量中。
提前感谢您的帮助。
发布于 2011-12-31 06:44:53
请看我在RailsInstaller群上对这个话题的回应:
https://groups.google.com/group/railsinstaller/msg/a0c2138948567b5b
将rails脚本(无扩展名,而不是rails.bat)的shebang行更改为:
#! /usr/bin/env ruby应该能行得通。
另外,在--env-shebang中安装sh.exe,这样gem就可以使用生成的无扩展文件了。
https://stackoverflow.com/questions/8680645
复制相似问题