Ruby on Rails development from scratch (Windows) (iv)-The first example of a delete check

Source: Internet
Author: User
Tags create database phpmyadmin ruby on rails

In the previous Ruby on Rails development from scratch (Windows) (iii)-Implementation of the jump between pages, we created two pages for the jump migration, this time we write a single form of maintenance of the TIM Delete Check the example.

1. This time we recreate a project depot, and follow the steps in the previous article to create a depot project.

2. Create a database.

You can use the Rails command line, created via MySQL, first navigate to the depot directory, and use the command:

Depot> Mysql-u root–p

The password is blank, and the following command is executed after connecting to MySQL:

mysql> CREATE database depot_development;
mysql> CREATE database depot_test;
mysql> CREATE database depot_production;
Mysql> Grant all in depot_development.* to ' Dave ' @ ' localhost ';
Mysql> Grant all in depot_test.* to ' Dave ' @ ' localhost ';
Mysql> Grant all on depot_production.* to ' prod ' @ ' localhost ' identified by ' wibble ';
Mysql> exit            

After the database is created, modify the contents of the Database.yml file in the Depotconfig directory and set the username entry of the development Library and test library to NULL.

You can also use the instantrails in the phpMyAdmin to create, phpMyAdmin boot can follow the following figure:

Here we are going to create three database depot_development,depot_test,depot_public, which are used for development, testing, publishing, respectively.

Related Article

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.