Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Installing a Ruby Development Environment Installing a Ruby Development Environment Installation Overview

kabir k
PLUS
kabir k
Courses Plus Student 18,036 Points

Ruby applications vs. Ruby on Rails applications

What's the difference between Ruby applications and Ruby on Rails applications?

And when to choose one over the other?

1 Answer

Kevin Korte
Kevin Korte
28,149 Points

Rails, is a framework for Ruby. Rails is written in Ruby. Rails is opinionated in how a web application should be set up, but, it's also flexible enough in its structure, that many applications work well inside of rails because Rails has been developed to follow best practices for a MVC framework, so even if you didn't use rails as your framework, you'd probably end up with a web structure that closely resembled how Rails is structured anyhow.

It just provides a nice ecosystem to develop in with its wide array of gems available. How do you choose? Rails is a great framework to choose unless you have a specific reason to need something different. On a more simple website, Rails might be too heavy.

Kevin Korte
Kevin Korte
28,149 Points

No problem, I'm developing a web app now, using Rails. Just by starting in Rails, I've saved myself days (maybe weeks) of setup, config, security, database, etc compared to starting from scratch in Ruby. And nicely enough, you can take advantage of the entire Ruby language in Rails.

kabir k
kabir k
Courses Plus Student 18,036 Points

Thanks Kevin, that helps. So can one make a website from Ruby or only good for simple web application? And if so, what are examples of websites that are made from just Ruby language itself?

Kevin Korte
Kevin Korte
28,149 Points

You can make as complex of a website as you want with Ruby, it's a fully matured web application language.

Here is a house building analogy.

Ruby is a big pile of 2x4 lumber. You can literally cut and build whatever house shape and size you want from the lumber.

Rails, is that same lumber, but its a bit assembled already to be a house. It gives you some generic walls and roof structures that almost all houses have. You still get to make the house look and feel how you want though.

I don't know of any plain Ruby sites, tbh but I'm sure they exist. I believe this site is RoR, I think Twitter was, it might be vanilla Ruby now....no idea. Sinatra is a lightweight framework also built in Ruby.