문제

I'm trying to upgrade an app from rails 2.3 to 3.0 and it has a file

app/utility/interface/import/import_statistics_manager.rb

which contains

class Utility::Interface::Import::ImportStatisticsManager         
//code here  
end

I beleive Utility::Interface::Import are the folder names in its file path but used as namespaces

This code works fine in rails 2.3 but when I try to run with rails 3.0.6 it throws a NameError

Error message:
   uninitialized constant Utility
Exception class:
   NameError

FYI: rails 2.3 uses ruby 1.8.7 and rails 3.0.6 uses ruby 1.9.2

Please correct me if my understandings are not correct

도움이 되었습니까?

해결책

For future reference (see comments on the question):

It helped adding the complete app folder to the autoload paths.

See this post for further info.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top