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" %*
可以在没有 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 变量中。
预先感谢您的任何帮助。
When Aptana creates a new Rails project, the following message comes:
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
In RailsInstaller ruby/bin folder there´s a bat file for rails (Rails.bat) that contains:
@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" %*
A new Rails project can be created without Aptana, but using it or types rails in its terminal produces the error.
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.
The ruby/bin is in my PATH variable.
Thanks in advance for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅我在 RailsInstaller 组上对此主题的回复:
https://groups.google.com/ group/railsinstaller/msg/a0c2138948567b5b
更改
rails
脚本的 shebang 行(无扩展名的,而不是rails.bat
):应该可以解决问题。
还要使用
--env-shebang
安装 gems,以便sh.exe
将能够使用生成的无扩展名文件。Please see my response to this topic on RailsInstaller group:
https://groups.google.com/group/railsinstaller/msg/a0c2138948567b5b
Changing the shebang line of
rails
script (the extensionless one, notrails.bat
) to:Should do the trick.
Also install gems with
--env-shebang
sosh.exe
will be able to use the generated extensionless files.