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

Ruby

Ruby on Trails track questions!

Hey! So I just signed up for Treehouse and I'm ready to take the Ruby on Rails course. I browsed through some of the tutorial titles and was quite intrigued, seems like fun stuff! I was wondering if, in Ruby on Rails, I could use RoR to build the dynamic aspect of the web application and use WordPress or any other web designing tool to build the CSS/HTML elements of the website? Is that how it works, or does Ruby on Rails have its own method of web design? Just a beginner! Thanks

2 Answers

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Rails has its own folder where it keeps all the views, they can be written in ERB (an extended HTML that allows you to put Ruby code inside to create dynamic content) or HAML (an elegant markup that I personally recommend). Rails apps also have folders for CSS stylesheets, so you generally create everything inside. The views have to be there, because they will be connected to the controller, which in turn talks to the database and lets you display dynamic data. I guess you could generate some HTML and CSS in external tools and then put them in Rails views after making some modifications, but I've never done that.

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

But the best way would be to go through the track and see for yourself whether you would need any external tools.

I guess what I'm trying to ask is, while making a PHP website that talks with the database, you've got HTML and CSS doing all the aesthetics while PHP does the database labor. Comparing to this, would Ruby on Rails also work with HTML and CSS?

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Yes, Rails is a framework that uses HTML and CSS for presentation and Ruby for talking with the database.

In the Ruby on Rails track, we learn how to build an HTML/CSS website before so I think we will be able to reuse it with Ruby, and Javascript too.

However, Wordpress is not a "web design tool" at all. Wordpress is already dynamic but using PHP.