Deploying Sinatra apps
  • I'm trying to deploy my Sinatra app, but I'm getting the error "cannot load such file -- gensou", which Google seems to think is due to a problem with Apache or nginx configuration. I can run it just fine on my local computer. My

    require 'rubygems'
    require 'sinatra'
    require 'gensou'

    root_dir = File.dirname(__FILE__)

    set :environment, :production
    set :root, root_dir
    set :app_file, File.join(root_dir, 'gensou.rb')
    disable :run

    FileUtils.mkdir_p 'log' unless File.exists?('log')
    log ="log/sinatra.log", "a")

    run Sinatra::Application

    and my application (gensou.rb):

    require 'rubygems'
    require 'haml'
    require 'sinatra'

    get '/' do
    haml :play
  • umh try using absolute paths e.g. /home/yourname/www...
  • That worked, thanks!
  • you are welcome :)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook

Share Me

  • Please share this topic with your friends. Click any of the icons below:
  • stumbleupon
  • Twitter
  • facebook
  • myspace
  • technorati
  • reddit
  • fark
  • email