Note that there are some explanatory texts on larger screens.

plurals
  1. POdeploy a sinatra app with passenger gives only 404, page not founds. Yet a simple rack app works
    primarykey
    data
    text
    <p>I have correctly (or prbably not) installed passenger on apache 2. Rack works, but sinatra keeps giving 404's.</p> <p><strong>Here is what works:</strong> <em>config.ru</em>:</p> <pre><code>#app = proc do |env| return [200, { "Content-Type" =&gt; "text/html" }, "hello &lt;b&gt;world&lt;/b&gt;"] end run app </code></pre> <p><strong>Here is what works too:</strong> Running the app.rb (see below) with <em>ruby app.rb</em> and then looking at localhost:4567/about and /</p> <p>restarting the app, gives me a correct hello world. w00t.</p> <p><strong>But then there is the sinatra entering the building:</strong> <em>config.ru</em></p> <pre><code>require 'rubygems' require 'sinatra' root_dir = File.dirname(__FILE__) set :environment, ENV['RACK_ENV'].to_sym set :root, root_dir set :app_file, File.join(root_dir, 'app.rb') disable :run run Sinatra::Application </code></pre> <p>and an <em>app.rb</em></p> <pre><code>require 'rubygems' require 'sinatra' get '/' do "Hallo wereld!" end get '/about' do "Hello world, it's #{Time.now} at the server!" end </code></pre> <p>This keeps giving 404s. <em>/var/logs/apache2/error.log</em> lists these correctly as "404" with something that worries me:</p> <pre><code>83.XXXXXXXXX - - [30/May/2010 16:06:52] "GET /about " 404 18 0.0007 83.XXXXXXXXX - - [30/May/2010 16:06:56] "GET / " 404 18 0.0007 </code></pre> <p>The thing that worried me, is the space after the / and the /about. Would apache or sinatra go looking for /[space], like /%20?</p> <p>If anyone knows what this problem relates to, maybe a known bug (that I could not find) or a known gotcha? Maybe I am just being stupid and getting "it all wrong?" </p> <p>Otherwise any hints on where to get, read or log more developers data on a running rack, sinatra or passenger app would be helpfull too: to see what sinatra is looking for, for example.</p> <p>Some other information: Running ubuntu 9.04, apache2-mm-prefork (deb), mod_php5, ruby 1.8.7, passenger 2.2.11, sinatra 1.0</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload