Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 A Guide to Ruby IDE's
Index -> Programming, Ruby -> Ruby Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Hikaru79




PostPosted: Sat Apr 02, 2005 7:39 pm   Post subject: A Guide to Ruby IDE's

WTD, don't shoot me... Embarassed

I'm doing this because I think that compsci.ca has a lot of talent and I also happen to think that Ruby needs more talented advocates. So I'm trying to increase interest -- however, I think you'll be hard pressed to find a thread in this entire forum (Ruby) that doesn't ask about what Ruby IDE's are out there, and complaining that they don't "get" FreeRIDE. So this is a thread introducing the various methods to write Ruby.

Although I prefer Linux, most of the people here run Windows, especially those who don't already know what IDE's are out there. So screenshots and links are for Windows, but it's almost exactly the same for Linux. No clue about Mac OS, because I've never owned one, unfortunatly Sad

Plain Text Editor
Wtd's personal favorite Wink If you use a simple text-editor, you will have to compile and run them on your own from command line, which can be a hassle at first. However, just because you are using a plain-text editor does NOT mean you have to do without auto-indeting and syntax color. For example, if you have the good sense to use VIM for Windows ( http://www.vim.org ) then you can get the very prettiful output :
SCREENSHOT:

Posted Image, might have been reduced in size. Click Image to view fullscreen.

IRB

IRB is the "Interactive Ruby "... something... "Builder," maybe. Either way, what it is is a real-time interpreter for Ruby. Basically, you get to see the return and effect of each line as you type it-- great for learning! Windows users can get to this by opening up a Command Prompt and running 'irb' (If they have Ruby installed, of course).
SCREENSHOT:
Posted Image, might have been reduced in size. Click Image to view fullscreen.

FreeRIDE

Probably the most famous Ruby IDE out there, even if it is somewhat incomplete. Also, it's open-source and -- most interestingly of all!! -- it's written entirely in Ruby. So you can open it up and see the Ruby code of a huge project such as FreeRIDE.

But that aside, FreeRIDE is pretty interesting in its own right, although certainly not up to par if you're comparing it to Eclipse or Netbeans or Dev-C++ or Visual Studio or Dreamweaver. You get the idea. It's included in the Windows all-in-one Installer ( http://rubyinstaller.rubyforge.org/wiki/wiki.pl )
SCREENSHOT:
Posted Image, might have been reduced in size. Click Image to view fullscreen.

Arachno Ruby IDE

By far the most professional and eye-candyish of the bunch. However, it comes at a price -- $50-some dollars. There's a free trial version that lasts for a while though, so you can still check it out.

It has most things that you'd expect from a modern IDE -- all the basics of an editor as well as Project support, etc. Most of the users here will probably be most comfortable with Arachno Ruby.
SCREENSHOT:
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Sat Apr 02, 2005 7:46 pm   Post subject: (No subject)

Nice. Just, you may wish to create thumbnails for the screenshots and link to the larger versions.

Have some bits. Smile
rizzix




PostPosted: Sat Apr 02, 2005 7:49 pm   Post subject: (No subject)

or... Use the extensible eclipse with the RDT plugin
Hikaru79




PostPosted: Sat Apr 02, 2005 7:56 pm   Post subject: (No subject)

wtd wrote:
Nice. Just, you may wish to create thumbnails for the screenshots and link to the larger versions.

Have some bits. Smile


Good idea =) Done!

rizzix wrote:
or... Use the extensible eclipse with the RDT plugin


Hmm... last time I checked that only worked with Ruby 1.6 (it's on 1.8.2 now), so I didn't include it. Has that changed since I last checked? I'd use Eclipse myself if I could Very Happy
rizzix




PostPosted: Sat Apr 02, 2005 7:58 pm   Post subject: (No subject)

*shrugs* i'm not into this ruby thing. if i'd to learn a new lang it would be Haskell. But due to its popularity here on compsci, i migh be forced to know it. hmm maybe Groovy?

but why would it not work with a new-er version? did they change/add to the syntax of the lang?
wtd




PostPosted: Sat Apr 02, 2005 8:01 pm   Post subject: (No subject)

rizzix wrote:
*shrugs* i'm not into this ruby thing. if i'd to learn a new lang it would be Haskell.


Well, now I'm conflicted. But I think I'll stick with yay! Smile
rizzix




PostPosted: Sat Apr 02, 2005 8:03 pm   Post subject: (No subject)

ruby didin't impress me. but haskell on the other hand. woof. Laughing
wtd




PostPosted: Sat Apr 02, 2005 8:13 pm   Post subject: (No subject)

Anything in particular stand out?
Sponsor
Sponsor
Sponsor
sponsor
rizzix




PostPosted: Sat Apr 02, 2005 8:16 pm   Post subject: (No subject)

wtd wrote:
Anything in particular stand out?

all your examples. in perticular the Parser example that you provided in the Java Help section. thats unbeatable. it was actually quite difficult if not impossible in java (assuming you dont function overload)
rizzix




PostPosted: Sat Apr 02, 2005 10:18 pm   Post subject: (No subject)

wait. didn't you overload the isBalanced function in haskell...?
wtd




PostPosted: Sat Apr 02, 2005 10:45 pm   Post subject: (No subject)

rizzix wrote:
wait. didn't you overload the isBalanced function in haskell...?


Yes, but not in the same sense as in Java. In Haskell you can't change the type signature of a function. However, you can overload based on the form of the data.

The typical factorial function:

code:
factorial :: Int -> Int


The factorial function takes an Int and returns an Int.

code:
factorial 0 = 1


If the argument is 0, then return 1.

code:
factoral n = n * factorial (n - 1)


If it's anything else, you know the drill.
rizzix




PostPosted: Sat Apr 02, 2005 10:58 pm   Post subject: (No subject)

ah ic .. nice nice
wtd




PostPosted: Sat Apr 02, 2005 11:07 pm   Post subject: (No subject)

My linked list and binary tree examples show this off extensively.

As well as guards.

This pattern matching is also extremely value when it comes to compound data. Consider passing a tuple to a function.

code:
foo :: (String, String) -> String


Now that's only one argument. I could therefore write the function smewhat like:

code:
foo arg = argPart1 ++ ", " ++ argPart2
  where
    argPart1 = fst arg
    argPart2 = snd arg


But why not just use pattern matching?

code:
foo (argPart1, argPart2) = argPart1 ++ ", " ++ argPart2


And the overloading comes in when we do something like:

code:
foo ("", argPart2) = argPart2
foo (argPart1, "") = argPart1
foo (argPart1, argPart2) = argPart1 ++ ", " ++ argPart2


Which prevents output with nothing in front of or behind the comma.
Bored




PostPosted: Fri Feb 03, 2006 10:52 am   Post subject: (No subject)

I downloded Ruby the other day and it came with freeRIDE and SciTE Editor. I tried both and can't figure out how to configure either to run my programs. The SciTE settings files confuze me and no matter what I do I can't seem to get the freeRIDE to run code when I click run. It just out puts
code:
>ruby C:\My Documents\Daniel\Ruby Programs\start.rb
>exit
and in the MS DOS-Promt it outputs
code:
Cannot find file 'CMD' <or one of it's components>. Check to ensure the path and filename are correct and that all required libraries are available.

It's not that big of a deal because I can always just save the file and run it manually but it would be nice if I could set up either of these programs to run the code when I click run.[/code]
Cervantes




PostPosted: Sat Feb 04, 2006 9:47 am   Post subject: (No subject)

I haven't played much with FreeRIDE, but SciTE is my editor of choice. It should be able to run your ruby programs from the get-go.

Bored wrote:

code:

>ruby C:\My Documents\Daniel\Ruby Programs\start.rb
>exit


When I run ruby programs from within scite (in windows), the first line is "ruby file_name", rather than "ruby path_to_file/file_name".

What was in your program? Does a
code:
puts "Hello World"

program output anything in the SciTE output pane?

Regarding the CMD bit, that's odd. You're running an old version of Windows, I assume? Is this displayed in a cmd prompt that was already open?
Display posts from previous:   
   Index -> Programming, Ruby -> Ruby Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 16 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: