Ruby IDE

I am new to Ruby, but I have used a lot of other
programming languages including Python, Ada, C++,
Java, etc.

I downloaded Ruby to my Windows machine and installed
it by executing the self-install file (a .exe). An IDE that
came with it, FreeRide, does not seem to work at all. The
editor, SciTE seems pretty useless.

Is there an IDE that actually works that one can use to
develop and compile Ruby. I am guessing there is since
so many people are using it.

Thanks in advance,

Richard Riehle

[email protected] wrote:

Is there an IDE that actually works that one can use to
develop and compile Ruby.

Here we go again.

Try and search the archives? There have been previous discussions on the
topic. The topic alone tends to cause the signal-to-noise ratio to
decrease though, so some wading through opinionated rants is required.

(By the way, you don’t need to compile anything, so a text editor -can-
cover the tiny part of the development cycle that I audaciously guess
you have only used of your IDEs.)

David V.

All I use is SCiTE and I’ve been writing ruby code for nearly two years.

[email protected] wrote:

develop and compile Ruby. I am guessing there is since
so many people are using it.

Thanks in advance,

Richard Riehle

Some more IDEs for Windows are: ArachnoRuby, Komodo, Eclipse with Ruby
Development Tools, Visual Studio with Ruby In Steel, RadRails (Eclipse
based, Rails focused).

There seems to be some confusion though: You don’t compile Ruby. The
Ruby interpreter executes your source code directly. So other than
syntax checking, integrated help, and syntax highlighting, an IDE
doesn’t buy you much. Fortunately, you have “ri” (command-line tool),
“fxri” (GUI version of “ri”), the Firefox Ruby Sidebar, ruby-doc.org,
gem_server (command-line tool to start a local-webserver to view the
RDocs for installed gems), for help (and that’s just the shortlist).

Don’t forget the power of just dropping into irb and typing:
(MyClass.methods - Object.methods).sort

I use that form of “help” more than anything else these days.

Syntax highlighting is a must IMO, but the UltraEdit syntax snippet is
good enough for me.

Frankly, I recommend against an IDE for Ruby. It’s not because there
aren’t good ones either. After a bit of adjustment Komodo is a pretty
polished package. ArachnoRuby is great too, though I think it may be a
“dead” project, and has a few quirks. But I don’t use class-browsers,
integrated unit-testing suites, etc. There’s a command-line equivilent
for each of those with Ruby, and they’re a lot more convenient than
learning 5 different ways for 5 different IDEs. So for me at least, I
appreciate the speed dropping a file into UltraEdit, making a quick
change, and saving gives me. I can go through that whole cycle in a
fraction of the time it takes Visual Studio 2005 + Resharper to load on
my work computer…

Sam S. wrote:

There seems to be some confusion though: You don’t compile Ruby. The
Ruby interpreter executes your source code directly. So other than
syntax checking, integrated help, and syntax highlighting, an IDE
doesn’t buy you much.

Like integrated unit test support.
Project management.
Debugging with source code navigation.
Semantics-aware code templates.

No, not much, unless you actually learn to use one effectively.

But I don’t use class-browsers,
integrated unit-testing suites, etc. There’s a command-line equivilent
for each of those with Ruby, and they’re a lot more convenient than
learning 5 different ways for 5 different IDEs.

Erm. The thing is you pick an IDE, stay with it, and use one way to
consume those things only instead of keeping idiosyncracies of
command-line interfaces in your head.

Also, this is too strongly an issue of personal work patterns to be
preached, and I find it irresponsible to mention that without a big YMMV
disclaimer.

I can go through that whole cycle in a
fraction of the time it takes Visual Studio 2005 + Resharper to load on
my work computer…

How often a month do you need to load an IDE again? Twice?

David V.

Twice a month??! I’m not going to name any names, but here goes…

Ideally you would keep your IDE open all the time. But in practice
things
are often less than ideal. As intellijent as these things are, they are
also
often very memory and disk intensive and eclipse your computer’s
resources.
I have the good fortune of using two rather heavyweight IDEs during the
course of my daily work and I find that on average I have to restart at
least once a day due to bugs, corrupted local histories and other
general
wonkiness.

That’s not so bad, but sometimes there are legitimate usage patterns
that
become a real pain. For example, if you’re working on several different
projects each day, all of them large-ish codebases, then you probably
don’t
want to keep them all open at the same time. Closing and reloading
projects
in the IDEs that I use is no quicker than a full restart.

I hope I’ve been vague enough that no one has a clue which IDEs I am
talking
about. Apart from the above issues, they are quite quite excellent. So I
don’t really have any preferences on the text-editor vs IDE issue.

Mushfeq.

[email protected] wrote in message
news:[email protected]

Is there an IDE that actually works that one can use to
develop and compile Ruby. I am guessing there is since
so many people are using it.

You don’t mention if you are a Visual Studio user. If so, you may want
to
try out our IDE, Ruby In Steel, which provides a full range of Ruby and
Rails editing, project management and debugging tools for VS.

best wishes
Huw C.

http://www.sapphiresteel.com
Ruby P.ming In Visual Studio 2005

On 2006-12-17, David V. [email protected] wrote:

Like integrated unit test support.
Project management.
Debugging with source code navigation.
Semantics-aware code templates.

Not to mention the ability to get a comprehensive view of the structure
of
a system (inheritance hierarchies, client relationships, subsystems,
class
interfaces [public methods and specs], etc.) as an aid in refactoring or
adding components. It’s pretty hard to do that from the command line.
(Not sure if any Ruby IDEs can currently do this, but it’s so useful, I
suspect it will be available in a few years.)

David V. wrote:

Like integrated unit test support.

Meh? What’s a couple keystrokes? Does that really help you be more
productive? I’ve used TestDriven.NET quite a bit, but I don’t think
twice about test integration with Test::Unit.

Project management.

Why would I want Gantt charts in my IDE?

Debugging with source code navigation.

You have a point here. I’ve lived without it, but it would be a plus.
Am I willing to trade speed for it though? Probably not.

Semantics-aware code templates.

You don’t need an IDE for this.

No, not much, unless you actually learn to use one effectively.

Ouch.

Erm. The thing is you pick an IDE, stay with it, and use one way to
consume those things only instead of keeping idiosyncracies of
command-line interfaces in your head.

Lucky you. I’m not seeing how “IDE idiosyncracies < command-line
idiosyncracies” though. Plus I work on Linux, Macs and Windows. So a
unified set of tools available on every platform is really nice. ri,
gem_server, irb, Test::Unit, etc give me that. TextMate > AnythingElse,
so I manage with UltraEdit on Windows and Vim on Linux. :slight_smile:

Also, this is too strongly an issue of personal work patterns to be
preached, and I find it irresponsible to mention that without a big YMMV
disclaimer.

Fair enough. YMMV. It’s just opinion. It’s not like it’s going to hurt
you to learn the command-line tools. Frankly, any Rubyist that doesn’t
know how to use “ri”, “irb”, “gem_server”, etc is doing themselves a
big disservice IMO, IDE or not. Whatever floats your boat though…

How often a month do you need to load an IDE again? Twice?

VS2K5 + Resharper eats enough RAM with a few browser windows,
query-analyzer, and folders open that having two solutions open at once
burns through my work computer’s 2GB of RAM pretty quickly and makes
things sluggish.

I think the reason why we don’t see much refactoring support is that
it’s just not needed. That’s just my opinion tho’.

Mushfeq K. wrote:

Ideally you would keep your IDE open all the time. But in practice things
are often less than ideal. As intellijent as these things are, they are
also
often very memory and disk intensive and eclipse your computer’s resources.
I have the good fortune of using two rather heavyweight IDEs during the
course of my daily work and I find that on average I have to restart at
least once a day due to bugs, corrupted local histories and other general
wonkiness.

Weird, that didn’t really happen to me on IDEA yet.

That’s not so bad, but sometimes there are legitimate usage patterns that
become a real pain. For example, if you’re working on several different
projects each day, all of them large-ish codebases, then you probably don’t
want to keep them all open at the same time. Closing and reloading projects
in the IDEs that I use is no quicker than a full restart.

Oi, talk about pots and kettles. I’ve never had the scenario of having
to split work time between projects and shamefully oversaw it.

Obviously, the solution is to keep all projects open at once, switching
between the windows (or more probably virtual desktops) and pester your
employer for more RAM :stuck_out_tongue_winking_eye:

David V.

Try

FreeRIDE

http://freeride.rubyforge.org/wiki/wiki.pl

Bye

Sam S. wrote:

David V. wrote:

Like integrated unit test support.

Meh? What’s a couple keystrokes? Does that really help you be more
productive?

Yes. I’ve switched from Eclipse and 250 dollars + VAT to IDEA precisely
because they add up. It’s also not only about the less time spend
typing, but about keeping the flow of your development cycle fluid and
without mental context switches.

Project management.

Why would I want Gantt charts in my IDE?

Not THAT meaning of project management. I meant keeping track of what
files belong to which project, or keeping track of interrelated
projects. Being able to only specify this dependency and never have to
bother with library load paths is one more thing utterly unrelated to
the code itself that you don’t need to keep in your head, which is a
Good Thing.

Semantics-aware code templates.

You don’t need an IDE for this.

An IDE implemented in Emacs Lisp / vimscript still is an IDE. Though
this specific feature doesn’t have much to do with the main focus of
IDEs, that’s providing uniform access to a set of tools, it is true that
what you commonly call IDEs usually implement more extensively
code-aware editing features.

Erm. The thing is you pick an IDE, stay with it, and use one way to
consume those things only instead of keeping idiosyncracies of
command-line interfaces in your head.

Lucky you. I’m not seeing how “IDE idiosyncracies < command-line
idiosyncracies” though. Plus I work on Linux, Macs and Windows. So a
unified set of tools available on every platform is really nice.

Surprisingly enough, cross-platform IDEs are not unheard of in the 21st
century. It’s also missing the point, the issue isn’t that a given
toolset isn’t available on a platform, rather that there is an impedance
mismatch between the different tools. How easily can you look up
documentation for some element you see in the debugger or irb? I
consider a copy/paste operation as something that takes too long for
this.

Also, this is too strongly an issue of personal work patterns to be
preached, and I find it irresponsible to mention that without a big YMMV
disclaimer.

Fair enough. YMMV. It’s just opinion. It’s not like it’s going to hurt
you to learn the command-line tools. Frankly, any Rubyist that doesn’t
know how to use “ri”, “irb”, “gem_server”, etc is doing themselves a
big disservice IMO, IDE or not. Whatever floats your boat though…

No, it’s not going to hurt. I know how to use them, I know how to use
their equivalents in all the other programming languages I regularly
use, I just find them suboptimal. I also use ruby-doc.org instead of ri
because of the cross-referencing.

I think the reason why we don’t see much refactoring support is that
it’s just not needed. That’s just my opinion tho’.

No, it’s just mind-bogglingly hard to implement. Refactoring means the
operation must be nondestructive with regards to semantics, and it’s
very difficult for a program that isn’t a Ruby interpreter to
sufficiently reason on Ruby code. And because of late method binding,
even the interpreter doesn’t know ahead of time for example what a given
method call might invoke. But that’s digressing.

David V.

David V. wrote:

Yes. I’ve switched from Eclipse and 250 dollars + VAT to IDEA precisely
because they add up. It’s also not only about the less time spend
typing, but about keeping the flow of your development cycle fluid and
without mental context switches.

It should also be noted that mental context switches, distractions,
interrupts, and other flow-breakers are partly the responsibility of the
developer - manager human interface. You can have the best IDE in the
world, but if you don’t have the clout to keep everyone elses’ monkeys
off your back, you might as well have a coding pad and a room full of
keypunchers for an IDE. Just another musing from the 40+ crowd. :slight_smile:

method call might invoke. But that’s digressing.

Actually, I think it’s strongly on-topic! I don’t typically use IDEs
because I work on small things that are for the most part well-defined
and self-contained. I consider the Windows or Linux desktop an IDE,
though – I really don’t use a coding pad any more. :slight_smile: But for the
command-line geeks out there, assume

  1. a large multi-programmer pure Ruby project,
  2. a mandated set of coding standards,
  3. a mandated single IDE that everyone must use

Given that, what would that IDE need to be able to do?


M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.

On 12/17/06, M. Edward (Ed) Borasky [email protected] wrote:

Given that, what would that IDE need to be able to do?

Find you a better place to work?

Wilson B. wrote:

Given that, what would that IDE need to be able to do?

Find you a better place to work?
Well … perhaps. But the reference to the coding pad was only half in
jest. It seems we all do our own keypunching now, and in a lot of cases
our own system administration as well. Functions that used to be
decidedly not part of a programmer’s daily routine are now expected of
us. And I’ll paraphrase Igor Stravinsky – an absolute freedom from
constraints can mostly inhibit creativity rather than promote it.

So … stick with the constraints. We have to do our own keypunching and
our own system administration and we have to use the same language,
coding standards and development environment. What does the part we type
into need to have?

My own answers are probably expected:

  1. It must know everything there is to know about the syntax and
    semantics of the language, in this case Ruby.
  2. It must not allow us to write programs that violate the coding
    standards, and must help us via code generation wherever possible.
  3. This is a biggie – I want to spend my time developing the product
    using the IDE, not enhancing the IDE itself! That pretty much rules
    out the Squeak IDE. :slight_smile:


M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.

“delta11” [email protected] wrote in message
news:[email protected]

Try

FreeRIDE

http://freeride.rubyforge.org/wiki/wiki.pl

Actually, I tried FreeRide, but it doesn’t seem to work.

When I invoke it, it simply flashes onto the screen and
instantly vanishes.

I appreciate the comments. Perhaps I should be a little
more clear. Or, perhaps I need to understand Ruby
a little better.

I do understand that Ruby is interpreted. The fxri window
works fine for console applications. The problem is that
it does not have a save option in the window.

I am having some difficulty executing my Ruby
script from SciTE.

Python, also interpreted, seems to be easier to use,
so far. I would like to use Ruby since I like the design
of the language better than Python.

I must be missing something in trying to set up the
environment. It is probably so easy that I am just
making it hard because of my experience with so
many other languages.

Richard

On 12/17/06, David V. [email protected] wrote:

How easily can you look up
documentation for some element you see in the debugger or irb? I
consider a copy/paste operation as something that takes too long for this.

umm… you can use ri directly from IRb pretty easily.

“adaworks” typed:

“delta11” [email protected] wrote in message

Try
FreeRIDE
Actually, I tried FreeRide, but it doesn’t seem to work.

When I invoke it, it simply flashes onto the screen and
instantly vanishes.

Perhaps the environment PATH variable does not contain a path to the
ruby
binary. In my experience, FreeRide showed similar behaviour and not
work when I had installed Ruby on a different partition under windows.
It
was a PATH problem.


Ayaz Ahmed K.

It is impossible to defend perfectly against the attack of those who
want to die.

M. Edward (Ed) Borasky wrote:

My own answers are probably expected:

  1. It must know everything there is to know about the syntax and
    semantics of the language, in this case Ruby.

Syntax highlighting already exists in many editors. I use Kate, which
is actually used as the editor component in the KDevelop IDE. This is
about the most you can do with Ruby for the same reasons why
refactoring is so difficult.

  1. It must not allow us to write programs that violate the coding
    standards, and must help us via code generation wherever possible.

If you’re typing repetitive Ruby code then you’re doing something
wrong. Ruby can generate code for you at runtime using metaprogramming
techniques. E.g.:

class MyFancyBaseClass
def self.supercomponent_accessor(component_name, managerator)
managerator.register_component(component_name)

define_method(component_name) do
  managerator.get_component(component_name)
end

define_method("#{component_name}=") do |value|
  value.perform_validity_checks
  managerator.set_component(component_name, value)
end

end
end

class MySuperThingy < MyFancyBaseClass
MANAGERATOR = ComponentManagerator.new
supercomponent_accessor :nose, MANAGERATOR
supercomponent_accessor :foot, MANAGERATOR
end

This is only a small example of the power of Ruby. You can create
methods to generate any code you can dream up at runtime. Unfortunately
with this level of flexibility and the rather relaxed syntax used by
the language it is nearly impossible to automatically police coding
standards. Ruby is a language for humans, not computers and only a
human can properly understand it without actually running it.

  1. This is a biggie – I want to spend my time developing the product
    using the IDE, not enhancing the IDE itself! That pretty much rules
    out the Squeak IDE. :slight_smile:

Squeak tries to do things it shouldn’t. When programming I want a set
of useful tools, not an operating system. In the same way, a full blown
IDE is usually overkill for Ruby code. A set of folders and policies
written in English is often the best way of managing Ruby code.

On Dec 18, 4:24 am, [email protected] wrote:

more clear. Or, perhaps I need to understand Ruby
a little better.

I do understand that Ruby is interpreted. The fxri window
works fine for console applications. The problem is that
it does not have a save option in the window.

I am having some difficulty executing my Ruby
script from SciTE.

In SciTE save your scripts with the “rbw” extension, which seems (I
don’t especially understand what’s happening - this just works!) to
help SciTE to capture the output from print statements. Failing that,
try working in the text editor of your choice - anything that
understands Ruby syntax should be adequate - and run your scripts from
a CMD window.

Python, also interpreted, seems to be easier to use,
so far. I would like to use Ruby since I like the design
of the language better than Python.

Interesting. I came to Python second and struggled to come to terms
with it after Ruby - it always seems less flexible and syntactically
less rich somehow. Perhaps a Python-oriented IDE might help - I never
felt that about Ruby.

If you really want an industrial-strength IDE (what were you using for
Python, I wonder?) then Ruby In Steel for Visual Studio is certainly
interesting.

I must be missing something in trying to set up the
environment. It is probably so easy that I am just
making it hard because of my experience with so
many other languages.

I suspect you’ve inadvertently managed to get off on the wrong foot! Of
the dozen or so languages I’ve found myself working in over the years,
Ruby is the one I’d most like to spend my days working in. Keep at it!

Mike