How do you configure RadRails to use Rails installed through RVM?

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

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

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

Answers


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

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.


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

$ which rails


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:

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.

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.


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


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


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.

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!


Need Your Help

What does ifelse do with NA values?

r if-statement na

I've got code that does what I want. I would, however, very much like to understand why it works one way and not the other.

chmod: cannot access ‘/app/hadoop/tmp/mapred/staging/hduser896097807/.staging/job_local89609780chmod:

hadoop distributed-computing yarn

i am trying to run a simple wordcount problem on single node setup hadoop but i getting this error everytime,