Nagy Bence <lists at ...> writes:
>
> Hi,
>
> I made some experiments with the sample blog application, my index.fcgi
> file contains the following:
>
> require ''camping/fastcgi''
> Camping::Models::Base.establish_connection(
> :adapter => ''sqlite3'',
> :database => ''database/camping.db''
> )
> Camping::FastCGI.serve(''blog.rb'')
>
> Without ScriptAlias the application works fine, but only if I give the
> url with "index.fcgi/" at the end
> (http://localhost/~gimb/camping/index.fcgi/). Loading
> http://localhost/~gimb/camping/ or
> http://localhost/~gimb/camping/index.fcgi (no slash at the end) gives an
> error:
>
> ./lib/camping/fastcgi.rb:180:in `camp_do'': undefined local
variable or
> method `exc'' for #<Camping::FastCGI:0xb78443e4> (NameError)
> from ./lib/camping/fastcgi.rb:79:in `start''
> from /usr/lib/ruby/1.8/fcgi.rb:117:in `session''
> from /usr/lib/ruby/1.8/fcgi.rb:104:in `each_request''
> from /usr/lib/ruby/1.8/fcgi.rb:36:in `each''
> from ./lib/camping/fastcgi.rb:78:in `start''
> from ./lib/camping/fastcgi.rb:90:in `start''
> from ./lib/camping/fastcgi.rb:123:in `serve''
> from /home/gimb/public_html/camping/index.fcgi:8
>
> With ScriptAlias the program run correctly on my computer, but my
> hosting provider gives access only for the .htaccess files, so there I
> can not use this directive. Is any other way to run camping programs
> only with or maybe without .htaccess tricks?
>
> Greetings, Bence
>
Actually Bence, that error is only partially related to the lack of ScriptAlias.
The problem is that without the ScriptAlias, you get an exception, and that
hits this bug in the exception handling code
(http://code.whytheluckystiff.net/camping/changeset/181), that is fixed
in svn. You can fix that bug, and then you''ll be able to move onto
whatever the exception is. You are probably having the same problems as
me, though, so go ahead and read my blog entry on it:
http://www.timocracy.com/articles/2007/07/06/
getting-camping-working-with-fcgi-on-a-shared-host-dreamhost
-part-1 (I had to break the link into three parts due to the annoying
gmane interface 80 char limit - go ahead and paste them together)