Ticket #122 (closed defect: fixed)

Opened 16 months ago

Last modified 10 months ago

Tepee & CampSH examples are missing active_record requirement in requires block

Reported by: dysinger Owned by: why
Priority: major Milestone:
Component: examples/campsh Version:
Keywords: Cc:

Description

Tepee & CampSH examples are missing active_record requirement in requires block and will not run without it.

Ruby 1.8.6 RubyGems? 0.9.2 Rails 1.2.3 et al

Attachments

examples.diff (0.9 kB) - added by dysinger 16 months ago.
Diff showing the requirement satisfied and examples working

Change History

Changed 16 months ago by dysinger

Diff showing the requirement satisfied and examples working

Changed 16 months ago by why

  • status changed from new to assigned

Actually, ActiveRecord should get loaded by the autoload in "camping/db". Could you provide me the error you're getting. I want to avoid explicity requiring AR.

Changed 16 months ago by dysinger

camping tepee.rb

!! trouble loading tepee: [NameError?] uninitialized constant ActiveRecord::Base /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:263:in `load_missing_constant' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:in `const_missing' /usr/local/lib/ruby/gems/1.8/gems/acts_as_versioned-0.2.3/lib/acts_as_versioned.rb:397 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require' /Users/tim/Projects/camping/examples/tepee.rb:3 /Users/tim/Projects/camping/examples/tepee.rb:3:in `each' /Users/tim/Projects/camping/examples/tepee.rb:3 /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:488:in `load' /usr/local/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/reloader.rb:61:in `load_app' /usr/local/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/reloader.rb:40:in `initialize' /usr/local/lib/ruby/gems/1.8/gems/camping-1.5/bin/camping:88:in `new' /usr/local/lib/ruby/gems/1.8/gems/camping-1.5/bin/camping:88 /usr/local/lib/ruby/gems/1.8/gems/camping-1.5/bin/camping:88:in `map!' /usr/local/lib/ruby/gems/1.8/gems/camping-1.5/bin/camping:88 /usr/local/bin/camping:16:in `load' /usr/local/bin/camping:16 ** No apps successfully loaded

Changed 16 months ago by evanweaver

The examples don't require 'camping/db' though. Should they?

Blog picks it up because it uses 'camping/session', but that's kind of inappropriate.

Changed 16 months ago by dysinger

evanweaver has it right adding require 'camping/db' to each fixes them too - AND - it doesn't require activerecord directly.

Changed 10 months ago by zimbatm

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

Okay, fixed in [210].

Note: See TracTickets for help on using tickets.