Running Ruby app on Apache

Posted by TandemAdam on Stack Overflow See other posts from Stack Overflow or by TandemAdam
Published on 2010-06-16T20:53:10Z Indexed on 2010/06/16 22:42 UTC
Read the original article Hit count: 234

Filed under:
|
|
|

I have been learning Ruby lately, and I want to upload a test web application to my server. But I can't figure out how to get it to run on my shared hosting.

My Hosting Details

  • Shared Hosting with JustHost (see here for list of features)
  • OS: Linux
  • Apache: 2.2.11
  • cPanel: 11.25.0-STABLE
  • No SSH access.
  • Can install Ruby Gems.
  • Can't install Apache modules.
  • Can "Manage Ruby on Rails Applications" through cPanel.
  • Mongrel gem is installed.

I built the following simple HelloWorld Ruby Rack app using Sinatra:

#!/usr/bin/ruby ruby
require 'rubygems'
require 'sinatra'
get '/hi' do
  "Hello World!"
end

I just can can't figure out how to "start" the application. Do I need to tell Mongrel (or maybe Apache) that the application exists somehow? How do I start this app running? I am happy to provide more info if needed.

© Stack Overflow or respective owner

Related posts about ruby

Related posts about apache