Web Hosting Services by Professional Website Hosting Dotservant Register Domain Name At $15/yr
 
Website Hosting Plan : Standard Plan : PHP,MySQL,Frontpage : 100 email,150MB web space,10GB transfer : 3 multiple domain hosting : 10.95 USD monthly
Webhosting Affiliate Program : Two Tier : Earn Extra commission

Frequently Ask Questions

Questions
Ruby on Rails
  1. How do I start a Ruby on Rails App?
  2. Is there a Ruby on Rails tutorial for beginners ?
  3. How to upload existing rails application ?


Answers
Ruby on Rails
  1. How do I start a Ruby on Rails App?

    After receiving the welcome email with login info to your hosting account


    1. IP address : xx.xxx.xxx.xxx
    2. Your hosting account username and password
    3. Cpanel http://xx.xxx.xxx.xxx/cpanel

    Log into Cpanel, click 'MySQL Database' option and set up mySQL database :-


    1. Create a database
    2. Create a dbuser
    3. Assign that dbuser to the database (NOTE: this step is important otherwise you will not be able to connect to the database)

    Also note that the actual dbname and dbuser name will have your hosting account login name as a prefix (e.g myacct_dbname, myacct_dbuser)

    SSH into your hosting account shell and generate your new Rails app

    SSH into your hosting account shell and at your home folder '/home/myacct/', run the following command:-


    [~]# rails yournewrailsapp

    Ruby on Rails will then generate the required folders and files for you.

    Modify environment.rb and database.yml files

    Both the database.yml and environment.rb file are in :-

    yournewrailsapp/config/

    Edit the database.yml file and make it look like this:

    production:
    adapter: mysql
    database: myacct_dbname
    username: myacct_dbusr
    password: your_db_password

    Leave the rest of the section in the file.

    NOTE: You must run your rails app only in production environment with your shared hosting account.

    In environment.rb file, just uncomment the following line to confirm you're in production mode:

    ENV['RAILS_ENV'] | |= 'production'

    Create a symlink so that the 'public_html' folder is pointing to the new Rails app's public folder.

    At the home folder , run the following commands:


    [~]# mv public_html public_html_bk
    [~]# ln -s yournewrailsapp/public public_html

    Test if your rails app is working by entering your domain in browser window, it will show a screen with the following text :-

    “Congratulations, you’re on Rails!”


    [Back to top]

  2. Is there a Ruby on Rails tutorial for beginners ?

    There is one simple tutorial at ruby on rails official website :-

    http://wiki.rubyonrails.org/rails/pages/Tutorial


    [Back to top]

  3. How to upload existing rails application ?

    After receiving the welcome email with login info to your hosting account


    1. IP address : xx.xxx.xxx.xxx
    2. Your hosting account username and password
    3. Cpanel http://xx.xxx.xxx.xxx/cpanel

    Log into Cpanel, click 'MySQL Database' option and set up mySQL database :-


    1. Create a database
    2. Create a dbuser
    3. Assign that dbuser to the database (NOTE: this step is important otherwise you will not be able to connect to the database)

    Also note that the actual dbname and dbuser name will have your hosting account login name as a prefix (e.g myacct_dbname, myacct_dbuser)

    Upload your mysql dump file and import into newly created database

    FTP upload your mysql dump file and SSH login to your hosting account and issue the following command to import the dump file content to the mysql server:-
    mysql -umyacct_dbuser -pdbuser password -Dmyacct_dbame < mysqldumpfile

    SSH into your hosting account shell and generate your new Rails app

    SSH into your hosting account shell and at your home folder '/home/myacct/', run the following command:-


    [~]# rails yournewrailsapp

    Ruby on Rails will then generate the required folders and files for you.

    Modify environment.rb and database.yml files

    Both the database.yml and environment.rb file are in :-

    yournewrailsapp/config/

    Edit the database.yml file and make it look like this:

    production:
    adapter: mysql
    database: myacct_dbname
    username: myacct_dbusr
    password: your_db_password

    Leave the rest of the section in the file.

    NOTE: You must run your rails app only in production environment with your shared hosting account.

    In environment.rb file, just uncomment the following line to confirm you're in production mode:

    ENV['RAILS_ENV'] | |= 'production'

    Upload your rails application files into appropriate skeleton folders of this newly created app

    • entire app folder (with the controllers, models, helpers, views)
    • public/images
    • public/javascripts
    • public/stylesheets
    • public/.htaccess (with the dispatch.fcgi rewrite, leave it if you have ammended the existing file)
    • config/database.yml(leave it if you have follow above steps to amend this file)
    • config/environment.rb(leave it if you have follow above steps to amend this file)
    • config/routes.rb (see below for editing note before upload)

    NOTE: before uploading you routes.rb file, edit the file and uncomment the following line :-

    map.connect '', :controller => "your_main_controller_name"

    upload it and then remove the yournewrailsapp/public/index.html, this will have your rails app calling your main controller when the application is called.

    Create a symlink so that the 'public_html' folder is pointing to the new Rails app's public folder.

    At the home folder , run the following commands:


    [~]# mv public_html public_html_bk
    [~]# ln -s yournewrailsapp/public public_html

    Test if your rails app is working by entering your domain in browser window, if everthing is setup properly you will be seeing your rails app showing up


    [Back to top]

 
 
PHP hosting
PHP Hosting
php5 hosting
PHP5 Hosting
ruby on rails hosting
Ruby on Rails Hosting
mysql hosting
PHP MySQL Hosting
mysql5 hosting
PHP5 MySQL5 Hosting
cpanel hosting
Cpanel Hosting
linux hosting
Linux Hosting
centos linux hosting
Affordable web hosting
frontpage hosting
Business Web Hosting
Website Hosting  /   Tutorial  /   Basic HTML Tutorial  /  
Multiple Domain Hosting  /   Domain Hosting  /   Wordpress Hosting  /   Joomla Hosting  /   Drupal Hosting  /   Mambo Hosting  /   Oscommerce Hosting  /   Dreamweaver Hosting  /  
Web Host  /   Web Space  /   Web Hosting  /   Website Hosting  /   Webhosting  /   Simple Shared Hosting  /   Easy Hosting  /   Quality Email Hosting  /   Web Page Hosting  /   Web Hosting Services  /  
PHP Hosting  /   MySQL Hosting  /   PHP5 Hosting  /   MySQL5 Hosting  /   Cpanel Hosting  /   PHP MySQL Hosting  /   PHP5 MySQL5 Hosting  /   Ruby on Rails Hosting  /  
Professional Website Hosting Affordable Web Hosting Services
Copyright 2000-2008 All Rights Reserved