我收到此錯誤,運行此LoadError:預期{} APP_PATH /模型/模型file.rb定義型號名稱
LoadError: Expected /home/user/Desktop/Tripurari/myapp/app/models/host.rb to define Host##
但在它的每一件事情的發生。有人能告訴我什麼是方法下的確切問題。
def self.check_all(keyword)
memo_mutex = Mutex.new
memo = {}
threads = []
name = keyword.keyword
SITES.each do |site_and_options|
threads << Thread.new do
@host = Host.find_or_create_by_name(site)
if keyword.unavailable_usernames.find_by_host_id(@host.id)
memo[@host.name] = true
else
memo[@host.name] = false
end
end
end
threads.each { |t| t.join }
memo
end