tags:

views:

3600

answers:

33
+67  Q: 

Ruby off the rails

Sometimes it feels that my company is the only company in the world using Ruby but not Ruby on Rails, to the point that Rails has almost become synonymous with Ruby.

I'm sure this isn't really true, but it'd be fun to hear some stories about non-Rails Ruby usage out there.

+1  A: 

We use some Ruby for file manipulation but have not been able to incorporate rails yet.

FortunateDuke
A: 

I haven't done any non-Rails Ruby web dev, but all of my Project Euler solutions are in Ruby, as well as some other small projects, like my IRC bot.

Lucas Oman
+2  A: 

We mainly use rails, but we have plenty of other non-rails ruby things - for example a standalone authentication daemon thing for centralized authentication of users, and an 'image processing server' which runs arbitrary numbers of ruby processes to process images in parallel.

Oh, and don't forget good old Rake :-)

Orion Edwards
+3  A: 

The only site I've done with Ruby at work is using Rails, but I'd like to try Merb.

Other than that I do a lot of little utility programs in Ruby - for instance an app that reads RSS feeds and imports new posts into a dabase.

It's fun, so I also write some dumb stuff just because it's so quick. Yesterday I wrote an app to play the Monty Hall problem 100,000 times to help a friend convince her professor that switching is the correct strategy.

palmsey
hey, professor should be able to understand pure logic behind this game, no need for simulations there.
vava
@palmsey, I'd be interested to see your algorithm.
macek
+2  A: 

Check out Shoes, a simple API for building GUIs in Ruby aimed at novice programmers.

Parappa
since _why gave it all up, you can find Shoes on Heroku: http://shoes.heroku.com
Dave Everitt
+1  A: 

I've used Ruby a lot professionally for quick scripts for things like shuffling files around. I'm the same way in that I was using Ruby first before touching Rails at all.

madlep
+27  A: 

One of the huge benefits of Ruby is the ability to create DSLs very easily. Ruby allows you to create "business rules" in a natural language way that is usually easy enough for a business analyst to use. Many Ruby apps outside of web development exist for this purpose.

I highly recommend Googling "ruby dsl" for some excellent reading, but I would like to leave you with one post in particular. Russ Olsen wrote a two part blog post on DSLs. I saw him give a presentation on DSLs and it was very good. I highly recommend reading these posts.

I also found this excellent presentation on Ruby DSLs by Obie Fernandez. Highly recommended reading!

Sixty4Bit
+1 for Russ Olsen's articles. They are a great read.
dertoni
+14  A: 

I use Ruby extensively in my work, and none of it is Rails (or even web) based.

My domain is usually client-side Windows applications (wxRuby GUI) and scripts, automating Excel, Internet Explorer, SQL Server queries and report generation (win32ole COM automation). I also use the sqlite, pdf-writer, and gruff libraries for various data munging and graph generation tasks.

Rails' success has been great for Ruby, but I agree that Rails has received so much attention that Ruby's value beyond the web is often overlooked.

David Mullet
+6  A: 

Ruby with a homebrew extension written in C++ does all the heavy pixel pushing for my photography processing. I was using Python+numpy but when doing artsy stuff, Ruby is just more fun. Also the relative lack of, or lesser maturity of, good image processing libraries makes me feel less like i'm reinventing wheels. I am clueless about Rails, other than i've heard of it, have a fuzzy idea what it is, and actually have a book on it (unopened)

DarenW
+1  A: 

In Boulder there was an excellent group of Ruby users who met monthly. This point was made - that Ruby does have an existence beside its use in Rails. Plain Ruby users do exist, are begging for attention, have neat things to show, and can find each other at user group meetings.

They also had better pizza than the Python group, who met also the same day of the month. Can only pick one...

DarenW
Yup, but the Python group had better Py! (lame joke, I know, I know...)
dguaraglia
so funny i forgot to laugh! 8P
DarenW
A: 

Ruby is also used for Desktop application. Especially the use of JRuby to develop Swing desktop application.

+1  A: 

I've used Ruby at work for

  • A data extractor, generating csv files from binary output.
  • A .ini file generator, turning a simple syntax into a repetitive .ini format.
  • A simple TCP/IP server, acting as stand-in for the customer's system during testing.
AShelly
A: 

Does part of Rails count? We've used Ruby for an ETL application and plugged in ActiveRecord just for its model validations.

Aaron
I love the activesupport stuff, too.3.days.from_now
Matthew Schinckel
+10  A: 

We are mainly a C++ shop, but we've found several areas where Ruby has proven quite useful. Here are a few:

  • Code Generation - Built several DSLs to generate C++/Java/C# code from single input files
  • Build Support
    • scripts to generate Makefiles for unix from Visual Studio Project Files
    • scripts for building projects and formatting the output for Cruise Control
    • scripts for running our unit tests and formatting the output for Cruise Control
    • scripts for manipulating Visual Studio projects and solutions from the command line
  • Integration Tests - We can crank out tests much quicker and cleaner using Ruby than C++
  • QA's entire testing suite is written in Ruby

Ruby is basically my go to tool for where it makes sense. And it makes sense in a lot of places.

Aaron Hinni
You should seriously consider using CMake to generate build files for both Unix (Makefiles) and Windows (Visual Studio).
JesperE
+2  A: 

We use Ruby to implement our test automation software. This includes test framework and driver code for Selenium RC, WATIR and AutoIT.

Ruby is powerful enough to create comprehensive applications that can interface with Test tools like Selenium or WATIR, while at the same time reading from data files, interacting with a remote Windows UI and performing near transparent network communication. All while running on Windows or Linux.

The uncluttered syntax makes it ideal for new and inexperienced programmers to read. While its totally OO nature makes it easy for these same programmers to apply good (recently learned) OO techniques, from the start.

The flexible nature of Ruby's syntax also makes the use and creation of DSLs much easier. This allows less-technical people to get invovled, read and possibly create there own tests.

Not all gems run that well on windows. Linux is a much smoother environment to run ruby on in my experience.
Zombies
+1  A: 

I have used Ruby for code generation of C# and T-SQL stored procedures in a project with unstable requirements. The data model was encoded in a YAML file and .erb templates were used for the classes and stored procedures. It also allowed for a much more DRY solution than would have been possible with straight C# as repetitve code could be factored out into a single method in the code generator.

domgblackwell
+2  A: 

Or you could use Ruby to make music ala Giles Bowkett's Archaeopteryx. This presentation by Giles about Archaeopteryx is one of the best presentations ever. I highly recommend it.

Sixty4Bit
+5  A: 

We use Watir (Ruby library) to test our .net web application.

Željko Filipin
Watir is extremely useful. We also use Selenium sometimes through Ruby.
Swanand
+1  A: 

Where I work, we use Ruby to do a number of different one-off type batch jobs. One example of that is a job that interacts with Amazon's S3 service. At the time, the Ruby S3 library was probably the easiest one out there for us to get up and running in a short amount of time.

mmacaulay
+1  A: 

I wrote an order processing expert system (see DSL answer as well), converted 100k lines of customer specific perl into about 10k lines of ruby handling dozens of customers. No web components at all, no Rails.

mmaibaum
+6  A: 

Google Sketchup uses Ruby as an embedded scripting language. You can use it to perform all sorts of 3d modeling and import/export tasks. The scripting works with the free version and there's even decent documentation.

hyperlogic
Hm, interesting. I should really try to get some time to play around with Sketchup.
JesperE
+2  A: 

RubyCocoa and MacRuby. Possible to make full Cocoa-based GUI apps without Rails. And then you get to use Interface Builder, too.

Matthew Schinckel
A: 

While we do have several Rails apps at work, we also use Ruby for some fairly intensive non-web stuff.

We've got an SMS delivery daemon, which pulls messages from a queue and then delivers them, and credit card processing daemon which other apps can call out to, which makes sure there's a central audit trail.

Jon Wood
A: 

I myself use both ruby on its own and combined with the framework rails. I made a ruby application which daily pulls all the highscores from a website and puts it in a mysql database. It is sofar the first and only application i made in ruby on it's own i made

A: 

I use Rails a lot at work, but for smaller applications or simple REST-based services I tend to use Sinatra. I'm also writing text-adventure game in Ruby for fun.

Lukas Stejskal
A: 

At work I do all my scripting for Windows with Ruby. Thanks to that I can say bye bye to Dos script

Yoann Le Touche
Quite an upgrade!
macek
A: 

I am a webdriver user. ruby is used by webdriver for automating the build process thanks to rake. see http://code.google.com/p/webdriver/ for details

luc
+1  A: 

I worked on a museum project last year that used a lot of Ruby. (http://http://ourspace.tepapa.com/home)

The part that I spent most of my time on was an interactive floor map. The Map on the floor has sensors so when people walk on it lights are triggered and displays in the wall show images or videos and audio tracks are played.

All the control code for this part of the exhibit is ruby. I wrote C interfaces with ruby wrappers to communicate with the floor sensors and the lighting controllers. The system queries a MYSQL database for the media files to be displayed and then tells computers in the walls to play the media via UDP.

It's the most reliable part of the entire exhibit.

Ruby was used for the other major part of the exhibit, the Wall though I didn't have much to do with that. Most of the graphics were prototyped in ruby using interfaces to OpenGL, a bit of Cocoa and a physics library before being ported to pure Obj-C.

Henry
that was a cool gig.
Steve Graham
+1  A: 

Heh, great question.

I used Ruby to convert Excel spreadsheet airport facility data to sqlite3 for the android phone platform while making an app for pilots.

DigitalRoss
+1  A: 

I use Ruby with Sinatra which is much simpler than Rails. I did use Rails but just found that it has turned into a bit of a monster, although Rails is still amazing compared to web frameworks available for Java.

The main feature of Ruby that I love however is "eval" and "method_missing", which Rails actually uses for example in ActiveRecord so that you can use the amazing "find_by-field-name-" queries.

Zubair
A: 

This interesting discussion thread is linked at www.DrinkRails.com

Sohan
+1  A: 

I used Ruby for a lot of back-end code simply because I was the only person who was tasked to do it and needed a nice clean language that allowed me to be very productive and write easy to maintain code. I find Ruby allows me to do that easier than Perl and Python. Other people's mileage might vary on that but it works well for me.

Besides that, I like how Sequel and Nokogiri work. I also used ActiveRecord for a while separately from Rails.

Greg
+1  A: 

I almost take insult that ruby is a rails thing. It is like back when CGI was the latest trend and everyone figured that if you knew perl you must be doing it only because you programmed CGI apps. Ruby is just a scripting language for me, although not as mature as python so I somewhat regret having to jump through some of its hoops and recent changes, I still like it and use it. Although I work in a java shop and therefore groovy is the ideal choice for a scripting language, I still use ruby at home and for throw away scripts that aren't needed to be shared at work.

I was considering getting into RoR from all the buzz and how quick/simple it is, but after looking over rails I didn't see anything at all that was amazing or even the least bit innovative or rapidly fast about its development compared to any other framework. The only benefit I saw was that I could code in ruby, which would be nice, but initial setup, server maintenance and scaling is more difficult, thus re-offsetting the pleasure of coding in ruby.

Zombies