Rails creates projects, creates controllers, model, and more

Source: Internet
Author: User

To create a new project before RAILS2:

RAILS3 and later create a new project: Rails new WebName

Create data table model:rails G model User name:string Sex:string

Create controller: Rails g Controller User index New Create edit update Delete

add field to User table:rails g migration Add_name_and_sex_to_user name:string sex:string

server back-end runs the Rails project development environment:Rails s-p 1026-b 192.55.34.43-d

server back-end running Rails Project production environment : Rails s-e production-p 8080-b 192.55.34.43-d

Server Background Direct running method (without Rails C):nohup Rails R "Librarybook.create_index_load_basedata" &

running in the development environment Rails C:rails c e Production

Rails creates projects, creates controllers, model, and more

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.