Gordon Gustafson
Gordon Gustafson

Reputation: 41209

what is ruby used for BESIDES rails?

Ruby on Rails has become a new competitive face in the server programming industry, along with php, asp.net, jsp, python, and a few others. But is ruby used for anything BESIDES rails? Does it owe all of its success to the rails framework? More questions here are tagged ruby-on-rails than ruby. However, I supposed PHP isn't used for that much outside of server stuff,

thoughts?

Upvotes: 42

Views: 34643

Answers (18)

Gordon Gustafson
Gordon Gustafson

Reputation: 41209

Homebrew, an open-source package manager for Mac OSX, is written entirely in Ruby, and is one of the most popular projects on github

Upvotes: 2

Tombart
Tombart

Reputation: 32428

All widely used provisioning (automation) tools like Puppet, Chef, Capistrano are written in Ruby. The choice of the language isn't random, for example Chef is using Ruby also for all configuration statements because the language is expressive, simple and easily readable. Puppet has own DSL (Domain Specific Language) which was designed to be accessible to sysadmins. Ruby makes it easier to interpret such a configuration language.

Also Vagrant - tool for creating and testing system images is written in Ruby. Bundler would be another example of a nice Ruby application for managing gem dependencies.

Metasploit framework is used for testing security issues and helps with penetration testing. It has been completlly rewritten in Ruby (previously written in Perl) in 2007.

A packaging tool fpm which simplifies process of creating packages (deb, rpm, gem, python modules, node packages, pear, ...) is also written in Ruby.

Ruby is general scripting language (unlike php) which can be used for writing scripts. You can write simple text file parser with regular expression in very few lines without the need to google everything because the syntax is simple and easy to learn.

Ruby on Rails is definitely most popular and brought a lot attention to Ruby language (which is great) but there are many other applications and new ones will for sure emerge.

Upvotes: 7

Kokizzu
Kokizzu

Reputation: 26848

RubyDNS: a dns server written in ruby

http://www.codeotaku.com/projects/rubydns/index.en

Upvotes: 2

dodgy_coder
dodgy_coder

Reputation: 13033

The Metasploit framework was written in Ruby and modules for it are also written in Ruby. This has become a commonly used method for writing security exploits and for security research.

Upvotes: 2

astropanic
astropanic

Reputation: 10939

Rubystein - Wolfenstein game clone using the Gosu library :)

Upvotes: 3

jrhicks
jrhicks

Reputation: 14997

Bio Medicine

Jules J. Berman, PhD, MD wrote a 378 page book on how to use ruby to solve the most common computational tasks in the field of biomedicine. As to my knowledge, this book has no mention of Rails.

Upvotes: 23

Mike Woodhouse
Mike Woodhouse

Reputation: 52326

But is ruby used for anything BESIDES rails?

Oh my gosh yes. Look at RubyForge, which predates Rails and the even older RAA for examples of non-Rails stuff. At work, besides the inevitable Rails-based intranet apps, I use ActiveRecord standalone for database work, scheduled backups, XML parsing, FTP downloads, CSV parsing, manipulating Excel workbooks and just about any other ad hoc scripting job that turns up. But I'm old - I started playing with Ruby before Rails was an apple in DHH's eye.

At home, I've done all kinds of strange things, some successfully, some rather less so. All, however, were fun and very few were related to Rails.

Does it owe all of its success to the rails framework?

No. Some, but not all. It's also true to say that Rails owes much of its success to Ruby, without which it would be a different beast.

Rails has undoubtedly increased the acceptance of Ruby, taking it to some sort of critical mass where a large enough proportion of developers - regardless of their opinion - have now heard of the language and have some idea of things for which it can be used.

And yes, it rocks.

Upvotes: 15

Samuel Jaeschke
Samuel Jaeschke

Reputation: 1296

It can also be used for scripting both standalone (with an interpreter) and within many other programs. Google Sketchup (for 3D-modelling) comes to mind...

Upvotes: 6

Jamie Rumbelow
Jamie Rumbelow

Reputation: 5095

Firstly, PHP was built to be a server language, first and foremost. That's one of the primary reasons it's not usually used for anything other than web applications - it's not designed for it and therefore can't match up to the requirements of, say, a scripted desktop application.

Ruby was designed as a general-purpose scripting language, and thus has a wide support for a number of different applications. It has been used across the board for everything from web applications, to web servers themselves, to intelligent graphing libraries, to picture recognition engines, to threaded database servers, to low-level system utilities. It has a wide spectrum of use throughout computing.

Rails has most certainly boosted the popularity of Ruby by a huge amount, brought it up into the forefront of scripting languages, spawning 40+ books, 18 conferences, distribution with nearly all the major operating systems and 7 different implementations to boot!

To begin with, all of Rails' internals are written in Ruby itself, but all of the Rubygems, libraries, snippets or anything else that is used by Rails developers is written in Ruby too, and is most likely built to work outside of the Rails stack.

Having said that, the popular web framework is not the reason why Ruby is popular. Sure, it has helped bring much-needed attention to the language, but it's not the reason why people use it day to day. It's used for everything from web applications to desktop GUI applications because of it's simple, elegant syntax, it's clean, sensible and complete standard library, it's wide ecosystem of community code, support and toolchains.

Ruby is used because it rocks.

Upvotes: 59

Sam DeFabbia-Kane
Sam DeFabbia-Kane

Reputation: 2609

As others have said, general scripting. The reason I prefer it for general scripting (over Python) is simple: inline regexes. Python's regex support is unfortunately awkward, and for scripting, regexes are usually pretty important.

I don't even think I have to mention why it beats Perl.

Upvotes: 6

J Bruno
J Bruno

Reputation: 131

Ruby was really a boutique language before Rails came out. It fills the same need that Perl and Python do. In the scripting space, Perl reigns supreme with Python gaining a lot of popularity the past 10 years. Ruby was sparingly used or heard of among people writing Perl and Python programs. When Rails came out it was very attractive to people doing web development (typically in PHP) so a lot of web programmers picked up Ruby while others saw no reason to switch from their comfortable Perl and Python environments.

Most people still use it only for Rails but its increased exposure has lead to more people using it "out in the wild" for non web tasks. Most places already have many programs written in Perl or Python and see no reason to switch. Most Linux distributions ship with Perl and Python preinstalled but not Ruby. Ruby also doesn't have as many third party modules available.

Upvotes: 13

Kevin Dente
Kevin Dente

Reputation: 25738

Shoes is a cross-platform GUI toolkit written in Ruby.

Upvotes: 5

stonemetal
stonemetal

Reputation: 6208

It is used as a base for DSLs. It is perfect for this purpose since its grammar is so flexible. For instance there is a make replacement called Rake.

Upvotes: 3

user167257
user167257

Reputation: 45

Various testing scenarios. WATIR and RSPEC as examples.

Upvotes: 1

Daniel Rodriguez
Daniel Rodriguez

Reputation: 1483

Web applications, scripting, some games, anything you can think of. A friend of mine was working on a ruby to as3 compiler :D

Upvotes: 2

ChssPly76
ChssPly76

Reputation: 100706

LessCSS and Webgen. Even if there was no ROR, those two would be quite enough to justify Ruby's existence in my book.

Upvotes: 1

Ólafur Waage
Ólafur Waage

Reputation: 70001

It's used to write all sorts of applications. Often used to write small script applications like python is.

Check out ruby forge.

Upvotes: 2

statenjason
statenjason

Reputation: 5180

Scripting tasks.

For example, I once used Ruby to scrape an entire website's content (hundreds of pages) into a comma separated file. Did it for migrating someone's static html website to a dynamic, database-driven one. Just bulk inserted the csv. Doing that by hand would've been impossible.

Upvotes: 5

Related Questions