Installation and configuration
Excellent Installation instructions at OnLamp.com.
- Ruby download and setup - follow instructions from the above link
- Rails download and setup - follow instructions from the above link.
You can use gem list --local to list the versions of tools installed and gem help commands for more commands such as gem update.
I couldn't find a -n option to gem, something which will just show me the commands it will be executing. - MYSQL setup - follow the ONLamp.com instructions.
- I used SQLyog, a free MYSQL GUI to perform the database setup.
- created databases demo_development, demo_test and demo_production
- created a user 'chetan'@'localhost' using Tools -> User Manager -> Add User
- granted All permissions for this user using Tools -> User Manager -> Manage Permissions
- created a table users with relevant fields
- Generate the rails app using the command
rails demo - Make sure the app was properly generated by starting the included WEBrick web server.
cd demo; ruby script/server
Navidate to 127.0.0.1:3000 - Update the demo/config/database.yml file with the database connection information. You can comment out socket: /path/to/your/mysql.sock line from the database.yml file.
So for development the section in my demo database.yml looks like
development:
adapter: mysql
database:demo_development
username: chetan
password: xxxxxxxxxxxxx
# socket: /path/to/your/mysql.sock

0 Comments:
Post a Comment
<< Home