create a rails project called student with mysql as database (default is sqllite)
rails -d mysql student
vim config/database.yml and edit username/password if required
create the database if not already created through backend
rake db:create:all
Generate a scaffold for a student
ruby script/generate scaffold studen name:string address:string
edit db/migrate/001_create_students.rb to add more tables or columns to existing table. This step can be skipped.
Create the Database tables
rake db:migrate
Run server
ruby scripts\server
Access the project through a browser
http://localhost:3000/students
tada
Subscribe to:
Post Comments (Atom)
2 comments:
Phabi ko kahe involve kar riya hai bhaiya??? :D
@epiphany : ab to completely involve ho gaya hoon phai .. shaadi ho gayi hai usse
Post a Comment