← Back to Upcase

Part 1 - Writing Integration Test: Issue with OpenStruct and Pow

(Jason Decker) #1


Using Pow I receive ‘uninitialized constant ApplicationController::OpenStruct’ unless I require ostruct.

WEBrick and the RSpec tasks appear to work just fine without the explicit ostruct require, perhaps WEBrick (or some other part of the Rails stack) and RSpec are requiring ostruct for their own purposes.

The OpenStruct.new is called in ApplicationController#current_user.

I am sharing this in the event anyone else runs into the same issue.

Setup information
ruby 1.9.3p392
Rails 3.2.13
Gemfile and
Branch with the broken-ish code (only breaks with Pow)


(Ben Orenstein) #2

Thanks for sharing the issue AND a fix. Much appreciated.