Wednesday, December 28, 2005

Installation and configuration

Excellent Installation instructions at OnLamp.com.

  1. Ruby download and setup - follow instructions from the above link
  2. 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.
  3. MYSQL setup - follow the ONLamp.com instructions.
  4. 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
  5. Generate the rails app using the command
    rails demo
  6. 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
  7. 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