On Thursday I tried to get the camping blog.rb example working with
rack/passenger/apache.

The config.ru (below) resulted in Camping Problem!
/ not found

require 'rubygems'
require 'rack'
require 'camping'
Camping.goes :Blog
Blog::Models::Base.establish_connection :adapter => "sqlite3",
:database => "/home/jonathan/.camping.db"
run Blog

This is what it should have in it:
require 'rubygems'
require 'rack'
require 'camping'
require 'blog'
Blog::Models::Base.establish_connection :adapter => "sqlite3",
:database => "/home/jonathan/.camping.db"
run Blog

When the top version of config.ru is run, it results in the route
maker getting a 'constants' array consisting only of ["I"] (instead of
["Style", "Logout", "Login", "PostN", "I", "Index", "PostNew", "Edit"]
). What magic sets the constants array? (couldn't find it with a quick
grep through the code)

I guess this is an easy mistake to make (at least for me it was) if
you just read the phusion passenger user guide which explicitly says
use "Camping.goes". So if anyone else sees this message, set config.ru
as above.

Cheers,
Jonathan

P.S. one would think that putting a require 'blog' before the
Camping.goes and commenting out the Camping.goes in blog.rb would fix
things with the first approach, but I stumbled into a whole hornets
nest of errors relating to Blog::Models::Base when I tried that.
_______________________________________________
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to