当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
在RailsInstaller ruby / bin文件夹中有一个用于rails(Rails.bat)的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变量中。
提前感谢您的帮助。
答案 0 :(得分:1)
请参阅我在RailsInstaller小组中对此主题的回复:
https://groups.google.com/group/railsinstaller/msg/a0c2138948567b5b
将rails
脚本(无扩展名,不是rails.bat
)的shebang行更改为:
#! /usr/bin/env ruby
应该做的伎俩。
同时使用--env-shebang
安装宝石,以便sh.exe
能够使用生成的无扩展名文件。