Create your first Rails application under Ubuntu

Source: Internet
Author: User

I. Create a new application

In console input

> Rails New Demo

Create        Create  readme.rdoc      Create  rakefile Create      config.ru create  . Gitignore      Create  gemfile      create  app ..... Your Bundle is complete! Use ' bundle show [Gemname] ' to see where a bundled gem is installed.         Run  bundle EXEC Spring binstub--all* bin/rake:spring inserted* bin/rails:spring inserted

The demo file is built.


Two. How to start the server

>CD Demo to the demo directory

Start the local Web server > Rails server

= = Booting Webrick=> Rails 4.1.1 Application starting in development on http://0.0.0.0:3000=> Run ' Rails server- H ' For more startup options=> Notice:server are listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option) = Ctrl-c to shutdown server[2014-06-22 11:11:48] INFO  webrick 1.3.1[20 14-06-22 11:11:48] Info  ruby 2.1.2 (2014-05-08) [x86_64-linux][2014-06-22 11:11:48] Info  webrick::httpserver# start:pid=5313 port=3000

Startup success

Three. Visit the server via the browser

This opens the browser input URL http://localhost:3000/, assuming that the following interface appears


OK, success.

For the funeral, please listen to the next explanation.


Create your first Rails application under Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.