My Recipe For Sinatra/Thin/Rack/Webfaction

Wednesday 03 June 2009 | 0 comments

The solution I am using for deploying a Sinatra app that runs on Thin and Rack on Webfaction, without Capistrano or Git, just using Rsync and Rake.

  1. Create the application:

    myapp
    config
       config.ru
       config.yml
       db
           migrate
               rake migration files
           myapp.sqlite3.db
    myapp.rb
    lib
    models
    public
       stylesheets
       images
       javascripts
    Rakefile
    tmp/
    views
       layout.erb
       myview.erb
  2. In the Wefaction Control Panel, create a custom application listening on port, get the port number, needed for config files. Create a domain. Create a website that links a domain to the application. Do a custom Ruby install. Install any necessary gems (eg Thin, Rack, ActiveRecord, whatever).
  3. Set up the config files and a Rakefile:

    config.ru

    config.yml

    Rakefile

  4. To deploy the site, rake deploy.

Comments

Previous Articles

Wednesday 16 December 2009

Stoptoad: Resolve All Hoptoad Errors

Thursday 19 November 2009

Acts As Lockdown

Wednesday 30 September 2009

javan-whenever + WebFaction

Sunday 30 August 2009

Sinatra To Do List Application