看來,磁帶自動加載機加載了LIB /工具/地址,而不是我的模型LoadError無法自動加載恆
地址引發以下錯誤
LoadError: Unable to autoload constant Address, expected /lib/tools/address.rb to define it
有人能告訴我,我做錯了什麼。我認爲
地址將指向不變模型/ address.rb
和
工具::地址到LIB /工具/ address.rb
應用程序/模型/ address.rb
LIB /工具/ address.rb
module Tools
class Address
blah blah
end
end
有一個在LIB /工具/ address.rb缺少結束。這只是一個錯字嗎? – jaydel
@jaydel是的,只是一個錯字 – bopritchard