Ticket #104 (closed defect: fixed)

Opened 22 months ago

Last modified 2 months ago

FastCGI.serve does not work when asking to bind and index

Reported by: mgorsuch Owned by: why
Priority: major Milestone: Camping 1.6
Component: camping/fastcgi.rb Version: 1.5
Keywords: Cc:

Description

According to the docs, one should be able to call the following to bind Blog to '/':

Camping::FastCGI.serve("/path/to/my/apps",Blog)

This fails for me everything I try while running Apache w/ FastCGI.

I was getting an error about this line:

script_load[script] unless @mounts.has_key? smount

It stated that "@mounts" was nil. Since it is being called from 'self.serve', that makes sense, as '@mounts' is only reachable via in an instance of FastCGI.

I have made the following modifications to fastcgi.rb to correct the issue (diff):

60c60
< 
---
>     attr_reader :mounts
176c176
<                      script_load[script] unless @mounts.has_key? smount
---
> 

My dispatch file looks like this:

#!/usr/bin/env ruby
current = File.dirname(__FILE__)

require 'rubygems'
require 'camping/fastcgi'
require 'camping/reloader'
ENV['FORCE_ROOT'] = "1"
Camping::Models::Base.establish_connection :adapter => 'sqlite3', :database => File.expand_path(current + '/camping.db')
Camping::FastCGI.serve(File.expand_path(current),Camping::Reloader.new('blog.rb'))

Please note that this is the first ticket I've ever submitted for another person's project. If I am missing any details, please let me know.

Michael michael.gorsuch@… http://www.styledbits.com

Change History

Changed 22 months ago by why

  • status changed from new to assigned
  • milestone set to Camping 1.6

Initial stab at fixing this is [176].

Changed 2 months ago by judofyr

  • status changed from assigned to closed
  • resolution set to fixed

Now when we're using Rack, this should be fixed. If not, it's not our fault, but Rack's.

Note: See TracTickets for help on using tickets.