Archive

Archive for August, 2008

quick note on ruby “require”

August 15th, 2008 mahesh 2 comments

I installed hpricot gem in a non standard directory on my shared server on hostmonster. When I tried, require ‘hpricot’ in ruby it failed to load even when I set RUBY_PATH variable in my bashrc file. The solution to that problem is to do require ‘rubygems’ and then require ‘hpricot’.  Supposedly, the path is altered after executing rubygems to pick up from the non standard path as well. Thanks to guys in the ruby-lang channel on irc.

me learns something new today!

Categories: Uncategorized Tags:

Hostmonster rails setup

August 14th, 2008 mahesh No comments

I finally got rails setup on my hostmonster server. They have some information about the setup in their knowledge base but that is a little outdated.  It needs to be tweaked a little bit to get it working. There are quite a few articles out there explaining how to get rails up and running but most of them are outdated. After some looking around and making 3 calls to the tech support, I got it to work. This is what you need to do to setup rails.

1.  Create a rails app whereveer you want in your home directory.

$ cd railsapp

$rails myapp

2. Create a symlink to the public directory from your www directory.

$ ln -s ~/www/myapp myapp/public

3. Create a subdomain pointing to ~/www/myapp. This will be url for your rails application.

4. This is how much the knowledge base goes upto. Note that you don’t have to do script/server start to start the server. They have already configured apache to run your application. All you have to do now is create a .htaccess file in the ~/www/myapp directory.  My file is here (rename the file to .htaccess) if you are interested.

5. Then go to the url of the subdomain you just created and voila! you have a rails app running ( I assume that you have created the database and have done all the usual stuff of settting up).

Note: Lot of people on the web had to change the permission to the directories and stuff. I didn’t do any of those.

Hope this helps someone someday! Let me kow if you have trouble setting up.

Categories: Uncategorized Tags:

my website is hostmonsterified

August 4th, 2008 mahesh No comments

yes. I changed my hosting provider (finally). If you didn’t know, my previous hosting provider was 1and1. I moved to hostmonster this month. The biggest reason I moved here is because of the support for rails. I have started learning rails and really wanted support for it. I have a dual boot linux on my desktop but most of the time I am on windows primarily for 2 reasons

1. sopcast doesn’t work on linux properly which means I can’t watch cricket if I am on linux.

2. When my mom comes online, I voice chat with her and I am yet to find a way to get voice chat on linux IM clients.

So, the obvious choice was to move to a provider who supports rails. After some researching on the web, I narrowed it down to hostmonster. They are relatively cheap (6 – 7 bucks a month), they have good reviews, they already have rails 2.x installed, unlimited storage. Also, I was losing patience with 1and1 because of the latency and stuff and they were 12 bucks a month!

Thanfully I had only 2 domains hosted and so wasn’t too bad to move servers. I have pretty much got everything setup. A couple more subdomains and I will be all set.

Hope hostmonster doesn’t disappoint me. So far, it has been good except last night, server was down for 1hr because of some network issue. Hopefully, I will be happy with them.

That’s all for now. Now that rails is setup, let’s see how far I go with it. If any of you have some cool idea for a web application, let me know. We can together write it in rails!

Categories: Uncategorized Tags: