Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure Ruby intepreter for Eclipse

I just installed the Ruby plugin for Eclipse. During creating my first Ruby project I fall into problems selecting the ruby interpreter.

I did New Project => Ruby project. But when it asked for an interpreter, the default was undefined, nothing showed up on the project-specific interpreter drop-down menu and when I clicked on 'Configure Interpreters' link it opened up a bad url page on my web browser.

What is the correct interpreter to use and how to configure ruby interpreter? Thanks for your help!

like image 770
Anisha Avatar asked Jan 26 '11 20:01

Anisha


People also ask

Can we use Ruby in eclipse?

Eclipse is the most commonly used Java IDE. Ruby on Rails provides some plugins to use Ruby on Rails in Eclipse. Two such plugins are Ruby Development Tools and RadRails. Ruby Development Tools (RDT) and RadRails are open source Ruby IDEs for the Eclipse platform.

What is Ruby interpreter?

A Ruby interpreter is any program that is able to interpret source code written in the Ruby language. Just like you might use different human translators or interpreters, there's not a single version of the Ruby interpreter. Instead, there are multiple interpreter options for Ruby developers.

Can IntelliJ run Ruby?

IntelliJ IDEA supports the reference implementation of Ruby (Ruby MRI) and alternative implementations, such as JRuby or TruffleRuby. Before installing the Ruby interpreter, you need to install the dependencies required to compile Ruby on your machine.


1 Answers

I started my ruby project in eclipse Indigo in Ubuntu 12.04 and have the same problem. If you installed ruby already and can create a ruby project in eclipse, then you can find/add interpreters by the following way:

  1. Go to Window -> Preferences > Ruby > Interpreters
  2. Click on Search button on the right, then eclipse will help you to find the ruby interpreters
  3. Click OK button at the bottom

For my case, the location of the interpreter is /usr/bin/ruby

like image 132
zhihong Avatar answered Sep 24 '22 22:09

zhihong