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.
Knowledgebase Article 258,044 views bookmark
sharetags: rails ruby (updated 540 days ago)
Share or save this via:
Recommended Help Content
What Ruby on Rails version and Gems are installed? (updated 64 days ago)
My Ruby on Rails installation keeps displaying a '404 Not Found' error. (updated 1140 days ago)
When I attempt to execute my Ruby on Rails application I receive "500- Premature end of script." (updated 1178 days ago)
Related Help Content
How to install Redmine a Ruby on Rails application (updated 588 days ago)
When I execute the 'Generate' command in my first Rails project, I get numerous errors and the controller is not built. (updated 600 days ago)
How do I install my own Ruby Gems? (updated 600 days ago)
Rails Troubleshooting! (updated 597 days ago)
Knowledgebase Article 27,726 views tags: rails
What is the path to Ruby? (updated 1698 days ago)
This article explains how to setup a SiteLock FTP account. (updated 58 days ago)
How do I setup CuteFTP 8.2 for FTP? (updated 1105 days ago)