Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-thread bug in rake task #22097

Closed
MaximeRVY opened this issue Oct 28, 2015 · 3 comments
Closed

Multi-thread bug in rake task #22097

MaximeRVY opened this issue Oct 28, 2015 · 3 comments

Comments

@MaximeRVY
Copy link

Hello guys,

I use Rails 3.2.22 and the gem Parallel. And I think I'm gonna be crazy because of class loading.

I use DelayedJob background job on Heroku and randomly some of my class is not defined and I have this kind of error NameError: uninitialized constant RequestAvailabilityForRoutes. So the first thing I've checked is to know if my class was well defined. So I've tried with no multi-thread, it seems working, but I want to use multi-thread..

Next, I've tried to change my autoload paths and follow this tutorial... Of course, no effect appeared...

And finally I find this issue #13142. But I don't understand how to not fallback in non-thread-safe autoloading ..

My configuration in production is :

  config.threadsafe!
  config.dependency_loading = true if $rails_rake_task

What I'm doing wrong ? Is the gem I use ? There is a workaround I didn't know ?

Please help me, I'm a little desperate..

@matthewd
Copy link
Member

Please use the mailing list or StackOverflow for questions/help, where a wider community will be able to help you. We reserve the issues tracker for issues only.

@matthewd
Copy link
Member

(Also, Rails 3.2 is no longer supported.)

@zdennis
Copy link
Contributor

zdennis commented Apr 12, 2016

@MaximeRDY, I just posted an update to #13142 . The erroneous commit got reverted, but it didn't get back ported so it looks to only be available in v5.0.0.beta1 and later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants