http://railstutorial.org/chapters/
1. rails new 'application name' -d mysql
2. cd 'application name'
3. bundle install
4. rake db:create
5. open another terminal to create database and tables
Command to starting mysql on terminal
mysql -u root -p
<a> create database 'database name';
<b> use 'database name';
<c> create table 'table name' (UserName varchar(20),password varchar(20));
6. rails generate scaffold 'table name' UserName:string password:string
7. rake db:migrate
8. Go on browser and given this command in URL
http://0.0.0.0:3000
No comments:
Post a Comment