Table of contents
[MISSING]Note: For development, use the rails built-in http server on port 3000. It is much more to the point, during development, than using Apache.
- Download ruby-1.8.2-i386-cygwin.tar.gz
- Unzip it to c:\cygwin (use paths in the zip file)
- Download rubygems-0.8.10.tgz to /tmp
- tar -zxvf it
- unset RUBYOPT
- ruby setup.rb
- gem update
- gem install rails
gem install --source http://dist.leetsoft.com login_generator
- In c:\windows\system32\drivers\etc\hosts put
- mkdir /rails
- cd /rails
- rails z
Notes on RailsAndApache2 relocated.
- Run MySQL-Front (Version 3.2, build 4.15):
- Create new session:
- Name: localhost-no-db
- Server: localhost
- Compression: off
- Login user: root
- password: (empty)
- Character set: utf-8
- Login with the session
- Click on the mysql database
- Click on localhost (unless you do both, the next menu is grayed)
- Database/New/Database
- Name: z_development
- Character Set: utf-8
- Collation: (empty)
- Repeat the Database creation for z_test and z_production
Edit /rails/z/config/database.yml
- reference z_development (and test and prod)
- Change host 'localhost' to '127.0.0.1'
- script/generate login Account
- edit app/controllers/application.rb and put at the top:
- require_dependency "login_system"
Also in app/controllers/application.rb, put just inside class ApplicationController
- Run SQL-Front and create table "users" (lower-case, plural).
- After the table is created, rename "Id" to "id"
- Field: login varchar(64)
- Field: password varchar(64)
- script/server
http://z:3000/account/signup
http://z:3000/account/login
- in /rails/z:
- script/generate scaffold User
- script/server
http://z:3000/users
- script/generate scaffold City
- script/generate scaffold Merchant