Problem Example Of Camping – Mongrel

Today it was time to do some poking around into how Mongrel and Camping fit together. I was going pretty well until I ran smack bang into a roadblock.

Mongrel v1.0.1 comes with an examples folder that contains some camping specific stuff. Good, thought I, let’s run them. The blog.rb example ran wonderfully, however, problems occurred when running tepee.rb:

/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:263:in `load_missing_constant’: uninitialized constant ActiveRecord::Base (NameError)
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:in `const_missing’
from /usr/local/lib/ruby/gems/1.8/gems/acts_as_versioned-0.2.3/lib/acts_as_versioned.rb:397
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require’
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require’
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in’
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require’
from tepee.rb:4
from tepee.rb:4

No ActiveRecord, lawd! So got my Google fingers walking and voila, the answer helpfully provided by Sir Evan Weaver. A dash of require ‘camping/db’ and it’s happy hour.

2 Responses to “Problem Example Of Camping – Mongrel”

  1. Hello,

    I know it’s probably been a while, but I was wondering if you still had the tepee.rb file that you’ve fixed. Since _why took his webpages down I’m unable to see the solution you referenced. Thanks in advance for any help you can provide.


Leave a Reply