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

Sporadic "sh: locate: not found" #43

Open
SirRawlins opened this issue Sep 13, 2014 · 2 comments
Open

Sporadic "sh: locate: not found" #43

SirRawlins opened this issue Sep 13, 2014 · 2 comments

Comments

@SirRawlins
Copy link

Hello People,

I'm seeing this error in my logs on occasion, and when it occurs my system CPU spikes and sits at 100% until it's restarted. The app can run for days at a time without this being an issue and then all of a sudden it kicks in and starts creating problems.

Sep 12 19:58:30 my-app app/worker.1: sh: locate: not found

I'm currently running active_pdftk (0.1.0) and running pdf-tk through the pdftk-heroku gem.

Any suggestions on what might be causing this would be greatly appreciated. I'm not yet able to determine if this missing locate is causing the CPU spike or vice-versa.

Thanks,

Robert

@elmatou
Copy link
Contributor

elmatou commented Feb 28, 2015

If you can tell the path of pdftk you should give it with :path option.
It should solve your issue, as 'locate' is a very common unix binary but with various implementations, and a local db file access wich coul be locked temporarly by other app...

@redrick
Copy link

redrick commented Apr 29, 2016

Hi guys,

I ran into same problem, what @elmatou said solves it.
I went with this in my case:

if Rails.env.production?
   ActivePdftk::Wrapper.new(path: '/usr/bin/pdftk')
else
  ActivePdftk::Wrapper.new
end

its just weirdness of my local installation.

but thank you and you can probably close this one done ;)

Thanks :)

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