Create A Rails App DIRECTIONS:Follow along as you begin learning the basics of Ruby on Rails, a powerful framework for creating dynamic, data-driven websites. ❏
Login to Cloud9
● Go to https://c9.io/web/login
❏
Open Workspace
● Click OPEN on your ruby-on-rails workspace tile
❏
Make Sure You Are In Your Workspace Directory
● The command-line should show (substitute your own username for bobleeswagger ):
Install Rails
● Use the gem command provided by the RubyGems package manager:
❏
bobleeswagger@ruby-on-rails:~/workspace $
$ gem install rails
You should see the following: Successfully installed rails-X.X.X X gems installed
❏
❏
Create New Dozerslist Application
● Create a new Rails application, named dozerslist , with a default directory structure:
Change Directory to New Application
● The rails command created a directory for your application; change directory, i.e., cd , to it:
$ rails new dozerslist -T --skip-turbolinks
$ cd dozerslist
❏
List the Contents of Application Directory
● Perform a directory listing, i.e., ls : $ ls -lart
● Click the green plus icon to launch a new command-line terminal
This will be used exclusively for running the Rails server and viewing any messages it outputs to the screen ❏
Start the Rails Server
● Change directory to dozerslist , your application’s directory: $ cd dozerslist
● Launch the Rails server: $ rails s -b $IP -p $PORT
You should see output similar to the following: => Booting WEBrick => Rails 4.2.3 application starting in development on http://0.0.0.0:8080 => Run `rails server -h` for more startup options => Ctrl-C to shutdown server [2015-07-19 00:44:46] INFO WEBrick 1.3.1
Page 2 of 3
[2015-07-19 00:44:46] INFO ruby 2.2.1 (2015-02-26) [x86_64-linux] [2015-07-19 00:44:46] INFO WEBrick::HTTPServer#start: pid=1596 port=8080
❏
Verify the Application is Running
● In your browser, go to the URL specified in the Cloud9 pop-up
You should see the Welcome aboard message:
❏
Go to the Filesystem Navigator
● Before moving on, navigate to the project’s directory in the filesystem navigator