HostMonster Web Hosting Help
Ruby on Rails Setup
- Create your Rails Application
- Access Your RoR Application
- Setup the .htaccess file
- Configure your .bashrc
Create your Rails Application
- Install whatever version of rails you want (provided it's compatible with ruby 1.9.3) as a local user: gem install rails --no-rdoc --no-ri
Create a new Rails application.
rails new ~/APPNAME -d mysql
gem install rails -v 3.0.11 --no-rdoc --no-ri) You may also use Rails v. 2.x for your app using the following syntax
Access Your RoR ApplicationIf you are using a subdomain you can use the following steps to create the subdomain.
- Log into your hostmonster control panel
- Select 'Subdomains' from the 'Domains' section
- In the small form that loads, type in the name of your subdomain (example 'APPNAME')
- From the drop down box select which domain you want to create that subdomain on.
- Make sure the "Document Root" box points to the folder you want the subdomain to be tied to. In this case, we want it to point to the public_html/APPNAME folder that we just created.
ln -s ~/APPNAME/public ~/public_html/APPNAME
Setup the .htaccess fileYou'll need this in public folder for the app which sets everything up including where to look for user-installed gems. To add this simply run the following commands:
- Press i to edit the file.
- Paste in the code from below.
- Enter :wq
- Press Enter to save the changes.
#Set this to whatever environment you'll be running in
SetEnv GEM_HOME /home1/examplec/ruby/gems
Configure your .bashrcYou will need to add the following to your ~/.bashrc file.
Recommended Help Content
What Ruby on Rails version and Gems are installed?
My Ruby on Rails installation keeps displaying a '404 Not Found' error.
When I attempt to execute my Ruby on Rails application I receive "500- Premature end of script."
Related Help Content
How to install Redmine a Ruby on Rails application
How do I install my own Ruby Gems?
This article explains how to setup a SiteLock FTP account.
How to setup an email account in Outlook 2016 for Windows
How to setup an email account in Outlook 2016 for Mac