dhash-vips icon indicating copy to clipboard operation
dhash-vips copied to clipboard

Add Rails Caveats Around Spring

Open cguess opened this issue 4 years ago • 6 comments

I think it would be a good idea to add instructions for Rails users (just to be nice), which involves removing Spring as referenced here by @jcupitt.

I can do submit a PR for this, but just wanted to make sure everyone is cool with it?

cguess avatar Jul 06 '21 18:07 cguess

I think it's more like a ruby-vips problem. There are many other gems that depend on it.

Nakilon avatar Jul 06 '21 18:07 Nakilon

Yes, I could well be wrong, it was just a guess. You'd need to test disabling spring, and perhaps ask a spring or senior rails dev for their opinion.

AvtiveStorage itself uses ruby-vips for image handling, so I'd expect this to be a fairly well-known issue.

jcupitt avatar Jul 06 '21 19:07 jcupitt

@jcupitt Disabling spring does, in fact, fix this issue. It may be a ruby-vips issue but from my perspective it seems like a good idea to at least note it in the set up.

cguess avatar Jul 08 '21 20:07 cguess

Ah, sorry, I hadn't realized. I agree, it's worth noting then.

I wonder how activestorage dodges this issue? I suppose it must delay init until requests come in.

jcupitt avatar Jul 08 '21 21:07 jcupitt

I'll ask over in the rails forums and update here when I hear more, because, yes, this seems like an interesting problem.

In the mean time expect a PR to the docs for this.

cguess avatar Jul 09 '21 16:07 cguess

Hello all, I think Kleis might have found the problem (or part of it) -- macOS is missing sched_getattr and this forces glib to start threads sooner.

https://github.com/libvips/php-vips-ext/issues/42#issuecomment-879817757

I've pushed a change to the head of 8.11 to delay thread startup a bit longer, and this might fix this. Would anyone be able to test?

jcupitt avatar Jul 14 '21 19:07 jcupitt