The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

What was your first Ruby app?

Besides the usual poking around in irb or copying examples, what is the first application you wrote using Ruby?

My first was a generator for PHP test script code! Basically many of my Model classes resembly TableDataGateways, and the tests I run for each method look similar with minor tweaks for parameters, etc. I wrote a Ruby shell script which would list the files in my models directory, allow you to choose one, then ready in the classes in the choosen script and present a list of the methods. When you selected the method it would write the basic test case for that method.

I have since refactored (in part due the the recoginition that if I needed a program to write a bunch of repetative test cases, then I have other problems) to the point where it is no longer needed, but that was my first baby steps.

My first and pretty much only app with Ruby was playing around with Ruby on Rails. Once I couldn't figure out a way to map ROR to joined tables/views, I dropped it. PHP does everything I need - don't see any reason to use Ruby.

The first one I tried writing by myself was a finance manager. Basically something to input bills, checks, etc. I got most of the logic stuff done in an afternoon and spent the rest of the weekend refactoring. It's not the most robust system in the world but I never intended for anyone other than me to use it

My first were a group of shell scripts doing all sorts of little things. One script to keep my dyndns hostname updated correctly. Another that parsed the text of a schema dump generated by ASP and turned it into a semi-valid SQL file. Another to automate the process of migrating a bunch of existing CVS projects to SVN. I did all of these in an afternoon, and they're still running perfectly today. Probably not more than 200 lines of code across all of them.

While I've played with Rails a bit, I find that Ruby as a general scripting language is just excellent. I create more readable, easier to use scripts with it and for rarely run, quick parse scripts it's speed issues aren't even relevant.

My first and pretty much only app with Ruby was playing around with Ruby on Rails. Once I couldn't figure out a way to map ROR to joined tables/views, I dropped it. PHP does everything I need - don't see any reason to use Ruby.

I'm continously baffled by people who give up on something so easy so quickly.

An adult content filter, unix pipe style. The bigger issue of the back end crunching to generate the look-up tables is my third app. It was this task that resulted in the performance thread I posted earlier.

Try reading the cookbook article that samsm posted earlier. It shows how to work with joins and it's relatively easy

Ah, maybe. I still don't really see any compelling reason to use Ruby. It seems a lot like Python and I hate hate hate Python. PHP irritates me a little, but it does most of what I need, and creating web sites with it is pretty trivial.

Ah, maybe. I still don't really see any compelling reason to use Ruby. It seems a lot like Python and I hate hate hate Python. PHP irritates me a little, but it does most of what I need, and creating web sites with it is pretty trivial.

That's cool and your choice. It's always nice to know all your available options though

An adult content filter, unix pipe style. The bigger issue of the back end crunching to generate the look-up tables is my third app. It was this task that resulted in the performance thread I posted earlier.

Have you tried out any of the ruby2c converters?

Originally Posted by lastcraft

My second was a Tk Suduko solver.

I wish I had a little more time for the ruby quizes. They look like a very nice way to learn ruby.

first two ruby apps

my first ruby program was a console script that would solve monoalphabetic simple substitution ciphers, (ie cryptoquotes in the newspaper). It counted tetragraphs (occurances of 4 letter combinations) in something like a novel, stored them in a hash, then would use the gathered statistics to score a ciphertext and make small changes in an attempt to improve the score. Fun first program to write, little slow. I rewrote the algorithm later on in java and there was a signifigant speed increase, but the code was moderately less obvious.

my second app was to teach myself how to write TK apps in ruby. It's a little GUI app that lets you search and replace using regular expressions. It has been very convenient for letting me see what is actually being matched by a regex while I'm crafting it. It also run's a little slow on large text files, but this has more to do with the way I'm pulling the data from the TKText object and setting up the TKTags to do the marking.

I've really enjoyed the language so far, and plan to keep using it for a variety of different tasks.

My first app is about halfway done. It's a rails controller & model to provide user signup, login, and profile editing. It has email verification and password recovery built in as well. Using it as a good app to get a good understanding of everything and at the end have something that might be valuable to others.

My first ruby program was a shell script that automatically queries and harvests contact info from Google for all possible phone numbers within a given area code and prefix and sorts it out into a CVS file.

my first code with Ruby was "Hello World" & first with Rails was code that printed "Hello World" 5 times in different colours & fonts!!
ok, my first serious application was that cookbook from that OnLamp tut, that samsm have already linked to!! Its a pretty good tutorial for beginners!!