这堂课怎么了?

时间:2022-10-29 00:08:52

For some reason, one of my Ruby on Rails classes produces this sort of error everytime I try to call any method on it:

出于某种原因,每当我尝试调用任何方法时,我的一个Ruby on Rails类就会产生这种错误:

undefined method `create' for Thread:Class

I created this class just like any other, using ./script/generate model Thread, and then migrating it. So why is it acting so strange?

我使用./script/generate模型Thread创建了这个类,然后进行迁移。那为什么它表现得那么奇怪?

1 个解决方案

#1


There is already a Thread class in ruby maybe its a name *

在ruby中已经有一个Thread类可能是它的名字冲突

#1


There is already a Thread class in ruby maybe its a name *

在ruby中已经有一个Thread类可能是它的名字冲突