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 Build a Simple Ruby on Rails Application Getting Started with Rails Generate a Rails Application

Tong Vang
Tong Vang
9,926 Points

Rails???

How do I open up Rails? Did the video mean Interactive Ruby? Its frustrating when the video expects a beginner to know where to find it.

5 Answers

Stone Preston
Stone Preston
42,016 Points

rails is a framework, not an actual application. you dont "open it up" you can use the rails command to do stuff though like generate a rails app or a model or a controller etc

Tong Vang
Tong Vang
9,926 Points

How do I access the rails command?

Stone Preston
Stone Preston
42,016 Points

you type rails followed by whatever command you want to do on the command line like

$ rails new my_new_app 

which would generate a new Rails application in your current directory assuming you have rails installed

Tong Vang
Tong Vang
9,926 Points

You are way ahead of me. What program do I open first? Interactive Ruby? When you say command line, are you talking about cmd.exe?

Magnus Hovland
Magnus Hovland
5,657 Points

Hi Tong,

Here's a little "getting started" guide for you, I hope it will help you, well, get started :)

  1. First make a new empty folder where you want your Rails app to be. Example: C:\Sites\myfirstapp

  2. Open command line by pressing Win + R, then type in "cmd" (without quotes), and press enter. (Alternatively you can use any other way you are familiar with)

  3. Navigate to C:\Sites\myfirstapp by entering the command

cd C:\Sites\myfirstapp
  1. You can now start using Rails by entering the command below:
rails new myfirstapp

The last word will be the name of your app, and can be anything you want :)

  1. Sit back and watch Rails and Ruby working together to generate your app. It will create a lot of files and folders, and it might seem to freeze sometimes. Just wait for it to finish. You can tell when it is done when the command line goes back to say "C:\Sites\myfirstapp>".

  2. Navigate to the folder you created earlier. In our examples case this was: C:\Sites\myfirstapp. You are now looking at your new Rails app. Feel free to look at the files and folders to familiarize yourself with everything.

Have a look at the Rails tutorials here on Treehouse to see what to do next :) Hope this was helpful to you, and anyone else reading it. Anyone please correct any mistakes I might have done (or bad grammar, as English isn't my first language)

-M