qbwc-mini

November 18th, 20081 comment

What is it?

Sinatra ruby server implementing QBWC callbacks in < 75 LOC

Introduction

I've blogged extensively on QuickBooks integration in Rails.

The short story is that working with ActionWebService sucks.

mini-qbwc is an experiment in simplicity and non-suckiness.

Prerequisites

  • Sinatra
  • Hpricot
  • fast_xs

Setup

1) Install prerequisites

$ sudo gem install sinatra hpricot fast_xs

2) Clone project

$ git clone git://github.com/zackchandler/qbwc-mini.git

3) Start server

$ ruby qbwc.rb

4) Install app.qwc in QBWC and run sync

--- --- ---

Coming home to Merb

October 31st, 20080 comments

The highlight of RailsConf 2007 for me was discovering Merb on the plane ride up to Portland.

I remember reading the router code and thinking, wow, I can understand this (as opposed to alias_method_chain madness of Rails)! I wrote a sample app and enjoyed playing with this new framework.

Fast-forward to today and my life has been mainly consumed with my startup which is written in Rails. I love Rails but I've had the Merb itch ever since...

Luckily a recent micro app allowed me to reacquaint myself with Merb.

Here are a few notes I made while deploying a merb app to Debian Etch using Capistrano and Passenger.

Apache & Passenger

$ sudo apt-get install apache2 apache2-prefork-dev
$ sudo gem install passenger
$ sudo passenger-install-apache2-module

Add to /etc/apache2/apache2.config

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.0.3/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.0.3
PassengerRuby /usr/bin/ruby1.8

Create /etc/apache2/sites-available/myproject

<VirtualHost *:80>
  ServerName www.myproject.com
  DocumentRoot /var/www/apps/myproject/current
</VirtualHost>

Enable site

$ sudo a2ensite myproject
$ sudo /etc/init.d/apache2 restart

Capistrano

deploy.rb

$ sudo deploy

Other details

I installed all gems locally for the app like:

$ gem install -i gems/ merb-core --no-ri --no-rdoc
$ gem install -i gems/ rest-client --no-ri --no-rdoc
...

config.ru

That's it. Passenger was super easy to install and configure.

Thanks to Ezra for hacking up Merb way back when and to all the core team for making Merb a very viable and solid framework.

--- --- ---

All Articles