Hi everyone,
I am having a problem with running rake tasks that involve threads.
Everytime I run it, I get an uninitialized constant with one of my
models (changes models occasionally) seems to be uninitialized.
I have tried to fix this by adding config.threadsafe! in the
application.rb. That did not work. So I tried to add
Rails.application.eager.load! and that did not work. I have tried to put
config.dependency_loading = true if $rails_rake_task but that does not
work. I have tried config.threadsafe! unless $rails_rake_task but that
did not work also.
I was wondering if anyone has come across this problem in which you are
using threads in a rake file and you get the uninitialized constant on
one of your models. Please help! I went through all the
stackoverflow pages related to this and nothing works I have ruby
1.9.3-p429, rails 3.2.13, rubygem 2.0.6