Steps to happiness:
you can see the proof at http://ruby.noelwalters.co.uk/
The rest - as they say - is up to you...
(please note I typed all this from memory - if you get stuck let me know.)
I'll be building on this a little more as I take my first steps into Ruby on Rails so check back from time to time if you're interested.
Right now I'm going to enjoy a well earned break - maybe open a bottle of something - getting this to work has taken many hours and stressed me out somewhat!
Noel.
Install Rails using CPanel
create a cron job to run the following commands
(don't forget to delete it when it's done)
cd /home/<your-home-directory>/ruby
gems/bin/rails testapp
cd testapp
/usr/bin/ruby script/generate controller main welcome
use CPanel to create a new subdomain, set the document root to ruby/testapp/public
point your browser at http://<your-subdomain>.<your-domain>/ - you should get the standard rails startup screen.
now try http://<your-subdomain>.<your-domain>/main/welcome - you should see
now you can add this line to ruby/testapp/config/routes.db - make sure you put it before all other "map.connect" lines.
now you can leave off the /main/welcome from the url and still see your app
swtich theme to x3
look under Software / Services
click on RubyGems
type "rails" in the second field and click "Install Now"
look under Software / Services
click on RubyGems
type "rails" in the second field and click "Install Now"
create a cron job to run the following commands
(don't forget to delete it when it's done)
cd /home/<your-home-directory>/ruby
gems/bin/rails testapp
cd testapp
/usr/bin/ruby script/generate controller main welcome
use CPanel to create a new subdomain, set the document root to ruby/testapp/public
point your browser at http://<your-subdomain>.<your-domain>/ - you should get the standard rails startup screen.
now try http://<your-subdomain>.<your-domain>/main/welcome - you should see
Main#welcome
Find me in app/views/main/welcome.rhtml
Find me in app/views/main/welcome.rhtml
now you can add this line to ruby/testapp/config/routes.db - make sure you put it before all other "map.connect" lines.
map.connect '', :controller => 'main', :action => 'welcome'
and delete or rename the file ruby/teatapp/public/index.htmlnow you can leave off the /main/welcome from the url and still see your app
you can see the proof at http://ruby.noelwalters.co.uk/
The rest - as they say - is up to you...
(please note I typed all this from memory - if you get stuck let me know.)
I'll be building on this a little more as I take my first steps into Ruby on Rails so check back from time to time if you're interested.
Right now I'm going to enjoy a well earned break - maybe open a bottle of something - getting this to work has taken many hours and stressed me out somewhat!
Noel.
Comment