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

using this gem on Windows is not working Av::CommandError #44

Open
strahinjakrstic opened this issue May 11, 2016 · 2 comments
Open

using this gem on Windows is not working Av::CommandError #44

strahinjakrstic opened this issue May 11, 2016 · 2 comments

Comments

@strahinjakrstic
Copy link

Hi, this is my first issue posting on github, so please if I'm not doing something right, please tell me :)

OK, so we have one project that is working on Linux version of server on AWS, and I use Windows as a OS. When I want to create new attachment using this gem, I get following error:

**Av::CommandError in Api::V1::DigitalProductsController#create

error while running command if command -v avprobe 2>/dev/null; then echo "true"; else echo "false"; fi: Command 'if command -v avprobe 2>/dev/null; then echo "true"; else echo "false"; fi' returned 1. Expected 0 Here is the command output: STDOUT:

STDERR:
-v was unexpected at this time.**

_I'm reporting this as an issue, as gem is working fine on Linux, but on Windows it is not good. _

I have tried to do everything that others users reported similar problems, but without any success. Also, on stack or Google, there is no search result with my issue, like nobody has this problem :(

Please can you see if there is an issue for real, or there are some things that are too obvious that I have missed. I'm sending some screens just in order to have full picture.

Thank you.
call_error
call_error_2

@strahinjakrstic
Copy link
Author

Hi, I have "fixed" av-0.9.0 gem by ignoring validation self.detect_command('ffmpeg') and have only ffmpeg command available as a choice, and now it works also on windows. This was kind of dirty method of removing the issue, but it works.

So for anybody that will face same issue, go to installed copy of av gem and find file:
av/cli.rb

then in that file remove line 7 "found << 'avconv' if self.detect_command('avprobe')"
then remove in line 8 validation "if self.detect_command('ffmpeg')"

BUT please ensure that you have ffmpeg working before you do this!

I'm writing this here only to help windows developers as this is a problem that will appear using this gem.

@BlackSwan84
Copy link

Hi, i have the same problem with windows.

I have do exactly what you recommend, but i don't know how to install this "fixed gem" in my project;

Can you tell me how you do ?

P.S: just for information, i am learning rails and web-development since on month...

Thank You

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

2 participants