This course will be retired on June 1, 2025.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
![](https://videos.teamtreehouse.com/stills/TH-RailsBasics-Stage1-Video2-stills-0.jpg?token=6991449e_0ff88031d86050ea47aa504a557aa423c08e942e)
- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Let's create a new Rails app, and then test it out.
Type "rails new", followed by the name of the app you want to create. To run a server, change into the new app's directory, then type "bin/rails server", or on Windows, type "ruby bin\rails server".
rails new appname
cd appname
bin/rails server
Rails will begin logging messages to your terminal. You should see a URL like "http://localhost:3000"; this is the address where the server is running. Paste that URL into your browser to view your app's welcome page.
To stop the server later, return to your terminal window and press Ctrl-C.
An important detail for Windows users: Anywhere in the upcoming courses that you see me type bin/rails, or bin/ followed by any other command, you need to change the command a little bit so that it works on your system. Just replace the bin/
with ruby bin\
. You need to do this because, unlike Macs and Linux machines, Windows can't run Ruby scripts directly by default; they have to be run through the "ruby" command.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Tate Pultro
11,765 PointsPsych::AliasesNotEnabled: Alias parsing was not enabled.
Posted by Tate PultroTate Pultro
11,765 Points0 Answers
-
Blair Walker
12,672 Points0 Answers
-
cloud712
7,616 Points1 Answer
-
Justin Reed
Full Stack JavaScript Techdegree Student 33,918 Points1 Answer
-
Gary Hull
3,795 Points1 Answer
-
Brian Fitzgerald
2,691 Points0 Answers
-
PLUS
Erin Claudio
Courses Plus Student 8,403 Points1 Answer
-
PLUS
Erin Claudio
Courses Plus Student 8,403 Points3 Answers
-
Dan Maliano
12,142 Points4 Answers
-
anthonybrackner
17,776 Points1 Answer
-
Jason Woo
11,730 Points6 Answers
-
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsCan't run server rails in Treehouse workspace
1 Answer
-
Brian Patterson
19,588 Points1 Answer
-
Nelly Nelly
7,134 Points1 Answer
-
Purvi Agrawal
7,960 Points14 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up