PDA

View Full Version : Making the sample RoR (Ruby on Rails) app work!



xic
12-11-2007, 06:07 PM
I worked with samples in books...the ones I worked with work well, utilizing a local webserver (WEBRICK) and port 3000. Once I got past that, I wanted to learn how to do RoR on the web.

Well, RoR setup is a *little* different on HostMonster...but not much. First of all, follow the instructions from the following link:

http://helpdesk.hostmonster.com/kb/index.php?x=&mod_id=2&root=35&id=232

Hostmonster laid it out pretty well, and explains some of the differences when developing RoR on their system. However, there is one key ingredient they left out!

In the ~/rails/first/config/environment.rb file, you will need to comment out the following line (most servers have been upgraded to 2.0.1):

RAILS_GEM_VERSION = '1.2.5' unless defined? RAILS_GEM_VERSION

...and that's it! After banging my head against the wall for a week, now my rails sample program works! Thank you HostMonster support!
:D

avus
01-30-2008, 07:17 PM
I followed the same recipe as you and the first time had little luck at all even after changing the permissions to 755. The second time I did get it to reach view in first.domainname.com/first/view and view (the view.html.erb, not the view.rhtml) did display the html title but none of the eruby attempt to display the material from the database.

I wonder and have asked whether .erb or .rhtml is active on the server. Does anyone know? Has anyone gotten either (.erb or .rhtml) to work on HM?

avus
01-30-2008, 07:19 PM
PS

The environment.rb already had version 2.0.2 listed,-- I commented it out since I read somewhere that they (HM) had taken it off line because of problems. This did not help.

kersimp
01-09-2011, 03:53 AM
That is so good to hear. At first time you will use Rails you might have some hard times but when you get used of it, you'll realized that it is just easy to use. Just like when I'm starting to use Ruby on Rails.


Now, most of my apps are running in Ruby on Rails and with the help of Background Job Rails (http://www.simpleworker.com/) all my jobs are so easy.