使用ActiveSupport时出现LoadError问题

时间:2013-01-08 16:53:12

标签: ruby-on-rails ruby ruby-on-rails-3.1

使用问题时出现load_missing_constant错误。只有我开始rake任务。 Rails服务器/控制台正常启动。

# app/models/journey.rb
class Journey < CouchRest::Model::Base
  include Searchable
end

# app/models/concerns/journey/payable.rb
module Journey::Payable
  extend ActiveSupport::Concern

  module ClassMethods
    def search
      true
    end
  end
end

#application.rb
config.autoload_paths += %W( #{config.root}/lib #{config.root}/app/models/concerns )

错误

  

/Users/user/.rvm/gems/ruby-1.9.3-p194@project/gems/activesupport-3.1.8/lib/active_support/dependencies.rb:490:in"load_missing_constant':预期/用户/ user / code / project / app / models / concerns / journey / payable.rb定义Journey :: Payable(LoadError)

0 个答案:

没有答案