如何配置RadRails以使用通过RVM安装的Rails?

时间:2021-12-21 20:39:35

How do I properly setup Aptana RadRails if I've installed Rails through RVM?

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

I followed the install on http://railstutorial.org/ but my script paths don't work: e.g.:

我按照http://railstutorial.org/上的安装,但我的脚本路径不起作用:例如:

  • 'rails' path: /home/marius/.rvm/gems/ruby-1.8.7-p302@rails3gemset/bin/rails
  • 'rails'路径:/home/marius/.rvm/gems/ruby-1.8.7-p302@rails3gemset/bin/rails

  • Detected path: Not Detected
  • 检测到的路径:未检测到

6 个解决方案

#1


1  

After installing ruby through rvm, I was able to get eclipse to use that install by:

通过rvm安装ruby后,我能够通过以下方式获得eclipse以使用该安装:

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

For me this found all of the ruby installs from rvm, and it added them to the interpreters list. I edited the "Name" field to include the version number for convenience.

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

#2


1  

try to run this in the command line. It will show you real path to the available rail script for current environment.

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

$ which rails

$哪个铁路

#3


1  

In Aptana Studio 3 (build: 3.0.8.201201201658) there is no Window -> preferences. If you have a .rvmrc in your project work directory, stating for instance:

在Aptana Studio 3(版本:3.0.8.201201201658)中没有Window - >首选项。如果项目工作目录中有.rvmrc,请说明:

rvm use ruby-1.9.3-p0@mygemset

... then Aptana should pick up the correct environment; in this case using ruby-1.9.3-p0 with gemset mygemset. Don't forget to run build install or build update (when you updated your Gemfile) from your project working directory path.

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

I must add that Aptana Studio 3 seems a bit buggy when it comes to picking up the correct environment, especially when trying to use ruby-debug-ide19.

我必须补充说,在获取正确的环境时,Aptana Studio 3似乎有点儿麻烦,特别是在尝试使用ruby-debug-ide19时。

#4


0  

Did you try with just /home/marius/.rvm/gems/ruby-1.8.7-p302/bin/rails ?

您是否尝试过/home/marius/.rvm/gems/ruby-1.8.7-p302/bin/rails?

#5


0  

You have to run eclipse/aptana from a terminal session.

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

#6


0  

Without 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.

请在控制台中键入command whereis ruby​​。如果你得到版本,你会得到/ usr / bin / ruby​​或/ usr / local / bin / ruby​​之类的路径来检查哪个是正确的解释器路径/ usr / bin / ruby​​ -v。那是你的翻译。

With RVM :

Please type command: rvm info

请输入命令: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!

#1


1  

After installing ruby through rvm, I was able to get eclipse to use that install by:

通过rvm安装ruby后,我能够通过以下方式获得eclipse以使用该安装:

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

For me this found all of the ruby installs from rvm, and it added them to the interpreters list. I edited the "Name" field to include the version number for convenience.

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

#2


1  

try to run this in the command line. It will show you real path to the available rail script for current environment.

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

$ which rails

$哪个铁路

#3


1  

In Aptana Studio 3 (build: 3.0.8.201201201658) there is no Window -> preferences. If you have a .rvmrc in your project work directory, stating for instance:

在Aptana Studio 3(版本:3.0.8.201201201658)中没有Window - >首选项。如果项目工作目录中有.rvmrc,请说明:

rvm use ruby-1.9.3-p0@mygemset

... then Aptana should pick up the correct environment; in this case using ruby-1.9.3-p0 with gemset mygemset. Don't forget to run build install or build update (when you updated your Gemfile) from your project working directory path.

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

I must add that Aptana Studio 3 seems a bit buggy when it comes to picking up the correct environment, especially when trying to use ruby-debug-ide19.

我必须补充说,在获取正确的环境时,Aptana Studio 3似乎有点儿麻烦,特别是在尝试使用ruby-debug-ide19时。

#4


0  

Did you try with just /home/marius/.rvm/gems/ruby-1.8.7-p302/bin/rails ?

您是否尝试过/home/marius/.rvm/gems/ruby-1.8.7-p302/bin/rails?

#5


0  

You have to run eclipse/aptana from a terminal session.

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

#6


0  

Without 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.

请在控制台中键入command whereis ruby​​。如果你得到版本,你会得到/ usr / bin / ruby​​或/ usr / local / bin / ruby​​之类的路径来检查哪个是正确的解释器路径/ usr / bin / ruby​​ -v。那是你的翻译。

With RVM :

Please type command: rvm info

请输入命令: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!