gpt4 book ai didi

ruby-on-rails - 如何在 Aptana Studio 3 上创建 Rails 运行配置?

转载 作者:行者123 更新时间:2023-12-04 04:24:10 25 4
gpt4 key购买 nike

我在 Mac OS X (High Sierra) 上使用 Aptana Studio 3。我已经导入了我的 Ruby on Rails 项目。我的Project Natures是这样设置的

enter image description here

我想设置我的 Rails 服务器,以便我可以从 IDE 运行它(或使用它进行调试)。奇怪的是,运行/调试设置只包括 PHP ...

enter image description here

那么我该如何创建一个运行配置来运行我的服务器呢?当我右键单击我的项目时,选择“运行方式”->“运行配置”,我看到这样的屏幕。不确定这是否是配置内容或如何配置的正确屏幕...

enter image description here

最佳答案

您可以运行您的服务器创建一个运行配置或只创建一个新的 Rails 服务器。

创建运行配置

在“Run Configurations”选项中,选择Ruby Applications > New_configuration,然后单击“Browse...”。键入“rails”以搜索 rails 文件并在“匹配资源”中选择它。点击“确定”。

enter image description here

然后转到选项卡“Arguments”,将工作目录设置为项目的根文件夹,在“Program Arguments”中输入值“server”并单击“Apply”。

enter image description here

现在您可以运行或调试您的应用程序了。

创建 Rails 服务器

转到 Windows > Preferences > Aptana Studio > Web Servers 并单击“New...”。

enter image description here

然后选择选项“Rails Server”,选择您的服务器名称并单击“确定”。如果您的项目性质未设置为“Rails”,则此处“项目”选项将为空,您需要先设置 Rails 性质。

enter image description here

如果你尝试像这样运行服务器,你会收到一个错误,告诉你程序“.../script/rails”不存在,所以首先你需要在你的项目中创建一个名为“script”的文件夹,然后将文件“bin/rails”粘贴到其中(如 here 所述)。

现在只需在您的项目中单击鼠标右键并选择“运行服务器”。

关于ruby-on-rails - 如何在 Aptana Studio 3 上创建 Rails 运行配置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58238455/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com