8

如果我通过 RVM 安装了 Rails,如何正确设置 Aptana RadRails?

我在http://railstutorial.org/上进行了安装,但我的脚本路径不起作用:例如:

  • 'rails' 路径:/home/marius/.rvm/gems/ruby-1.8.7-p302@rails3gemset/bin/rails
  • 检测到的路径:未检测到
4

6 回答 6

1

尝试在命令行中运行它。它将向您显示当前环境的可用 Rail 脚本的真实路径。

$哪个轨道

于 2011-02-17T19:08:20.663 回答
1

通过 rvm 安装 ruby​​ 后,我可以通过以下方式让 eclipse 使用该安装:

In Eclipse, go to Window -> Preferences.
In the Ruby/Interpreters tab click "Search"

对我来说,这发现了所有从 rvm 安装的 ruby​​,并将它们添加到解释器列表中。为方便起见,我编辑了“名称”字段以包含版本号。

于 2011-08-23T19:03:18.947 回答
1

在 Aptana Studio 3(内部版本:3.0.8.201201201658)中,没有 Window -> 首选项。如果您的项目工作目录中有一个 .rvmrc,例如:

rvm use ruby-1.9.3-p0@mygemset

...那么 Aptana 应该选择正确的环境;在这种情况下,使用带有 gemset mygemset 的 ruby​​-1.9.3-p0。不要忘记从项目工作目录路径运行构建安装或构建更新(当您更新 Gemfile 时)。

我必须补充一点,在选择正确的环境时,Aptana Studio 3 似乎有点错误,尤其是在尝试使用 ruby​​-debug-ide19 时。

于 2012-02-13T10:22:36.830 回答
0

你试过了/home/marius/.rvm/gems/ruby-1.8.7-p302/bin/rails吗?

于 2011-02-15T02:47:15.067 回答
0

您必须从终端会话运行 eclipse/aptana。

于 2011-05-27T00:41:04.523 回答
0

没有 RVM :

Please type command whereis ruby in console. you will get the path like /usr/bin/ruby or /usr/local/bin/ruby to check which is correct interpreter path /usr/bin/ruby -v if you get version. that is your interpreter.

With RVM :

Please type command: rvm info

binaries:
    ruby: "/home/<USERNAME>/.rvm/rubies/ruby-2.0.0-p247/bin/ruby"

copy this path and paste wherever you need enter you interpreter path.

It worked for me. and I hope it will help others as well.

Cheers!

于 2014-02-12T08:17:02.270 回答