Not logged in (Log in or Sign up)

unwwwritten

She canna go any faster, Captain

Well, after all my frustration at past attempts to run Ruby on Rails applications on HostMonster, it finally came time to get my blog up and running...

It seems that the Rails community is shifting away from Typo to either Mephisto or to the new kid on the block, SimpleLog. Since I really expect very little from a blogging engine... SimpleLog would appear to fit the bill.

The requirements were basic enough:

  • Ruby 1.8.4+ (will work with 1.8.2, but not with 1.8.3)
  • Rails
  • MySQL 4.2+ or PostgreSQL 7+
  • Any modern web browser for the admin interface (Firefox, Camino, Safari, Omniweb or such, IE is not supported)

HostMonster runs Ruby 1.8.5, Rails 1.2.3 and MySQL 4.1.22.

Note to self -- MySQL may be a problem -- watch out!

So... assuming that things would work out with MySQL, off I went.

If you want to replicate my success, just follow these "simple" steps...

  1. Download and expand SimpleLog into your rails folder...

    cd ~/rails
    curl -O http://simplelog.net/download/simplelog_2.0.2.tgz
    tar zxvf simplelog_2.0.2.tgz
    cd simplelog_2.0.2
    
  2. Change the permissions on a few things...

    chmod 755 log/
    chmod 755 theme_backup/
    chmod 755 public/dispatch.fcgi
    
  3. Using the hostmonster control panel define two databases, simplelog and simplelogtest, and a simple user account that has full access to both databases.

  4. Edit config/database.yml as follows -- replacing {account} with your hostmonster account name and replacing {password} with the password you assigned to the account created in step 3...

    development:
      adapter: mysql
      database: {account}_simplelog
      username: {account}_simple
      password: '{password}'
      socket: /tmp/mysql.sock
    
    
    # Warning: The database defined as 'test' will be erased and
    # re-generated from your development database when you run 'rake'.
    #
    # DO NOT SET THIS DB TO THE SAME AS DEVELOPMENT OR PRODUCTION!
    test:
      adapter: mysql
      database: {account}_simplelogtest
      username: {account}_simple
      password: '{password}'
      socket: /tmp/mysql.sock
    
    
    # Unless you have a specific reason, leave this the same as 
    # development when installing SimpleLog, since this allows for
    # easy DB setup using rake (see README for installation
    # instructions)
    production:
      development
    
  5. Run the rake task for initial setup (and testing)...

    rake simplelog:install:tested
    

    NOTE: This should complete with a message indicating that there were 0 failures and 0 errors.

  6. Using the hostmonster control panel define a blog subdomain and then use a symbolic link to connect the subdomain folder to the simplelog_2.0.2/public folder.

    cd ~/public_html
    rm -r blog
    ln -s ~/rails/simplelog_2.0.2/public blog
    
  7. Try it out... just point your browser at it and it should be running.

The first hit may be a little slow as the FastCGI process starts up, but subsequent hits should be lickety-split!

For further help setting up the blog itself, check out the SimpleLog wiki.

Until next time...

--Brent

blog comments powered by Disqus