Aptana Studio 3不能与RailsInstaller 2.0.1一起工作



当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的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" %*

一个新的Rails项目可以在没有Aptana的情况下创建,但使用它或在其终端中输入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变量中。

提前感谢您的帮助。

请参阅我在RailsInstaller组对这个主题的回应:

https://groups.google.com/group/railsinstaller/msg/a0c2138948567b5b

rails脚本(非rails.bat脚本)的shebang行修改为:

#! /usr/bin/env ruby

应该可以。

也安装gems与--env-shebang,这样sh.exe将能够使用生成的无扩展文件

最新更新