これはかなり些細なことのように思えますが、私にヘラーの悲しみを与えています!
libフォルダーにモジュールがあります。
require 'net/http'
module Weather
def get_response
NET::HTTP.get_response(URI.parse 'someURL').body
end
end
コントローラー。
class SunController < ApplicationController
include Weather
def show
logger.debug get_response
end
end
config / Application.rb
config.autoload_paths += %W(#{config.root}/lib)
そして、私はこのエラーを受け取ります
uninitialized constant Weather::NET
モジュールが正しくロードされていることはわかっています。私は何が間違っているのですか?