Deploying Sinatra app on Dreamhost/Passenger with custom gems

Posted by darkism on Stack Overflow See other posts from Stack Overflow or by darkism
Published on 2009-12-02T00:38:02Z Indexed on 2010/04/03 14:53 UTC
Read the original article Hit count: 607

Filed under:
|
|
|
|

I've got a Sinatra app that I'm trying to run on Dreamhost that makes use of pony to send email. In order to get the application up and running at the very beginning (before adding pony), I had to gem unpack rack and gem unpack sinatra into the vendor/ directory, so this was my config.ru:

require 'vendor/rack/lib/rack'
require 'vendor/sinatra/lib/sinatra'

set :run, false
set :environment, :production
set :views, "views"

require 'public/myapp.rb'
run Sinatra::Application

I have already done gem install pony and gem unpack pony (into vendor/). Afterwards, I tried adding require 'vendor/sinatra/lib/pony' to config.ru only to have Passenger complain about pony's dependencies (mime-types, tmail) not being found either!

There has to be a better way to use other gems and tone down those long, ugly, redundant requires. Any thoughts?

© Stack Overflow or respective owner

Related posts about ruby

Related posts about sinatra