Aptana Studio 3 无法与 RailsInstaller 2.0.1 配合使用

发布于 2024-12-23 15:11:32 字数 921 浏览 1 评论 0原文

当 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

看透却不说透 2024-12-30 15:11:32

请参阅我在 RailsInstaller 组上对此主题的回复:

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

更改 rails 脚本的 shebang 行(无扩展名的,而不是 rails.bat):

#! /usr/bin/env ruby

应该可以解决问题。

还要使用 --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, not rails.bat) to:

#! /usr/bin/env ruby

Should do the trick.

Also install gems with --env-shebang so sh.exe will be able to use the generated extensionless files.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文