Create Rails application
simple step to create sample Application with Rails3.0.3
Step 1 : Create Rails Application
$rails new sample -d mysql # -d to specify which database use
Step 2 : Enter to your project
$cd sample/
Step 3 : Enter your mysql user and password
$gedit config/database.yml
Step 4 :
$rake db:create
if any error like “bundle install”
$sudo bundle install
Step 5 :To create rails scaffold
$rails generate scaffold Student name:string city:string #scaffold name should be start with caps ans be a singular
Step 6 : migrate for create database
$rake db:migrate
Step 7 : Start rails server
$rails server
open browser http//:localhost:3000 #can change port no like 3003
it will show rails index page
then http//:localhost:3000/students # here scaffold name should be a plural.
successfully created sample rails application..
thanks……….
Trackbacks & Pingbacks