- ccpanel Login and Create MySQL Database
- ssh Login on your Domain
- Create a test App
rails test
- Edit config/database.yml
development: adapter: mysql database: yourDBName username: yourDBUser password: yourMySQLPass host: localhost ...
- Run
rake db:migrate
If you got "Unitialized constant RDoc"
- Edit Rakefile
Change require 'rake/rdoctask' to
require 'rdoc/task'
- Run
rake db:migrate
Now you shouldn't get any Error
- Edit Rakefile
- Generate a testing Scaffolding
script/generate scaffold users name:string email:string
rake db:migrate
- Simlink your Rails directory in public_html
cd ../public_html
ln -s ../test/public rails
- Edit .htaccess
cd ../test/public
pico .htaccess
The File must contains these lines below:
DirectoryIndex dispatch.fcgi RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
Save
Ctrl+x
- Test your Application on http://yourdomain/rails/