RailsPlayground
How to use Camping at RailsPlayground

  1. Create an .htaccess file in your public_html directory or the directory were you will be deploying your application to. It should contain the following
    Options +FollowSymLinks +ExecCGI
    
    RewriteEngine On
    RewriteCond %{REQUEST_URI} ^/stats/(.*)$ [OR]
    RewriteCond %{REQUEST_URI} ^/failed_auth.html$ [OR]
    #RewriteCond %{REQUEST_URI} ^/static/(.*)$ [OR]
    RewriteCond %{REQUEST_URI} ^/mint/(.*)$
    RewriteRule ^.*$ - [L]
    
    RewriteRule ^$ index.html [QSA]
    RewriteRule ^([^.]+)$ $1.html [QSA]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
    
  2. Create a dispatch.fcgi in your public_html directory
    #!/usr/local/bin/ruby
    require 'rubygems'
    require 'camping'
    require 'camping/fastcgi'
    ENV["FORCE_ROOT"]=1.to_s
    Camping::Models::Base.establish_connection :adapter => 'sqlite3', :database => "databasename.db" 
    Camping::FastCGI.serve("campingfilename.rb")
    

Notice: File uploads do not work when using camping through FCGI.