N
Neha Gupta
Hello Guys,
I am trying to use threads in my RoR app.
But unfortunately I came across a very strange issue.
I am unable to use "finders" within my thread to read data from my
database.
In addition to this, the Thread does not allow me to create any new
object inside the Thread.
Eg:
class TagsController < ApplicationController
def some_method
begin
Thread.new do
new_user = User.new
end
rescue
p $!
end
end
end
Throws an exception saying
"#<ArgumentError: A copy of TagsController has been removed from the
module tree but is still active!>"
Could somebody guide me where am I going wrong.
Thanks & Regards,
Neha Gupta
(e-mail address removed)
I am trying to use threads in my RoR app.
But unfortunately I came across a very strange issue.
I am unable to use "finders" within my thread to read data from my
database.
In addition to this, the Thread does not allow me to create any new
object inside the Thread.
Eg:
class TagsController < ApplicationController
def some_method
begin
Thread.new do
new_user = User.new
end
rescue
p $!
end
end
end
Throws an exception saying
"#<ArgumentError: A copy of TagsController has been removed from the
module tree but is still active!>"
Could somebody guide me where am I going wrong.
Thanks & Regards,
Neha Gupta
(e-mail address removed)