Skip to content

Rails-1

January 8, 2011

I learnt the sample page in Rails

In Terminal:

1. rails new student_details -d mysql –(rails new project_name is create a database in sqlite as default. in this command  i create the site with mysql. )

2. cd student_details/

3. gedit config/database.yml —> put the mysql password in a corresponding line

4. rake db:create

5. rails generate scaffold student name:string address:text dob:date

6.rake db:migrate

7.rails server (WEBrick server as started at port of 3000)

open the internet browser type the url as

8. http://localhost:3000/students

 

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: