Skip to content

PeeDee/Dreamhost-Sinatra-Test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Dreamhost Sinatra Test

In trying to get btw working remotely on Dreamhost it was driving me crazy failing without any diagnostics; so I’ve put together this smaller set of files and have gotten it working.

Directory Structure

In case it’s not clear from the Sinatra book (it wasn’t to me), the file tree you require is like this:

my_app_directory - eg. /home/<USER>/sinatra/test
  /config.ru - the rackup file
  /my_app.rb - the app
  /public - has to be there for DH to configure Passenger, even if empty
  /tmp - has to be there for Passenger, even if empty
    /restart.txt - Passenger reloads code if the modify timestamp here is new

Rackup File

I’m putting this here instead of checking it into git because you need to edit the gem path for your home directory, and ~ won’t do.

## config.ru - rackup file for sinatra on passenger on dreamhost

# Passenger doesn't pick up my own gems without this
ENV['GEM_PATH'] = '/home/<USER>/.gems:/usr/lib/ruby/gems/1.8'

require 'test'

run Sinatra::Application

Useful command line snippets

alias tt=‘touch ~/sinatra/test/tmp/restart.txt’ alias access_tail=‘tail -f ~/logs/DOMAIN_HERE/http/access.log’ alias error_tail=‘tail -f ~/logs/DOMAIN_HERE/http/error.log’

Useful Links

About

A basic test suite on Dreamhost

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages