other_video_transcoding: M1 MacBook Pro shows can't find gem video_transcoding

Sorry if this is a duplicate request. I’m just so lost. Just when I thought everything was OK - M1 MacBook Pro shows “can’t find gem video_transcoding”. I thought I had migrated homebrew successfully, but ruby must be more complicated, or I’m just not able to solve the problem.

$which transcode-video /usr/local/bin/transcode-video

$/opt/homebrew/bin/transcode-video zsh: no such file or directory: /opt/homebrew/bin/transcode-video

$/usr/local/bin/transcode-video /Library/Ruby/Site/2.6.0/rubygems.rb:265:in find_spec_for_exe': can't find gem video_transcoding (>= 0.a) with executable transcode-video (Gem::GemNotFoundException) from /Library/Ruby/Site/2.6.0/rubygems.rb:284:in activate_bin_path’ from /usr/local/bin/transcode-video:23:in `<main>’

Is there a simple fix I’ve missed? Any fix I’ve missed?

Thanks.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 32 (9 by maintainers)

Most upvoted comments

So, forgetting about gem install for a moment, can you run other-transcode just as a standalone script?

wget https://raw.githubusercontent.com/donmelton/other_video_transcoding/master/bin/other-transcode
chmod a+x other-transcode
./other-transcode

My point, I suppose, is that trying to troubleshoot an issue with an older tool (video_transcoding) that is no longer in active development on a system that is brand new might not be the most useful approach if other_video_transcoding is a tool that meets your needs. I realize that folks might have good reasons to want to use video_transcoding, which is why I asked. 😃

Most of us have significantly more expertise with other_video_transcoding, especially on newer hardware and operating systems.

If you were on anything other than a super fast M1, I wouldn’t suggest this, but you can search your entire system for “transcode”, which I assume will only be found in files related to Don’s script.

find / -name "*transcode*" 2>/dev/null

The 2>/dev/null is to silence all the “Permission denied” sections of the system that your user isn’t allowed to look into.

Oh, and you should make sure you don’t have any network shares mounted before you run that.

@loshlee I’m sorry we weren’t able to help more. But we really can’t inspect your system to diagnose your Ruby installation. Since this question really has to do with a tool in a different project, I’ll close this now. I hope you’re able to solve this on your own.

@loshlee The always helpful @ttyS0 is correct. You can install other-transcode without actually installing the Gem. That’s because other-transcode is actually contained in a single file.

@loshlee You had that backwards in your previous comment. Just to be clear…

The video_transcoding Gem contains transcode-video, convert-video, detect-crop and query-handbrake-log. These tools are built around HandBrakeCLI. However, as @ttyS0 mentioned, this Gem is no longer in active development. In fact, I haven’t updated it in years. I no longer recommend using it.

The other_video_transcoding Gem contains other-transcode and ask-ffmpeg-log. These tools are built around ffmpeg. This Gem is maintained and updated regularly. This is the Gem you should be using.

Perhaps this isn’t the most constructive approach.

It might be worth while to first determine if there’s an issue with your system running transcode-video in the first place.

Can you save the Ruby script to your home directory, and attempt to run it directly?

For example:

wget https://raw.githubusercontent.com/donmelton/video_transcoding/master/bin/transcode-video
chmod a+x transcode-video
./transcode-video

On a side note, I notice that you’ve opened this issue in the other_video_transcoding repository, but seem to be referring to the video_transcoding tool. Is there a particular reason you’re wanting to use the older video_transcoding tool instead of other_video_transcoding?

@loshlee Remember that you’re not just looking for stray versions of transcode-video. The video_transcoding Gem also contains the convert-video, detect-crop and query-handbrake-log tools.

@loshlee I suspect you got yourself into this predicament by improperly updating your Gems. Remember, if you use sudo to install as the guide you linked to recommended, then you need to use sudo when you update. Or it’s kinda random where they’ll go.

@loshlee You can try this to remove the version in the system, if it’s there:

sudo gem uninstall video_transcoding

As for other versions, I’m not sure where they might be installed. Maybe somewhere inside this path:

/usr/local/lib/ruby/gems/

@loshlee Right. You can’t install in the system library that way. You need to:

sudo gem install video_transcoding

See the sudo prefix?

Did you remove all previously installed versions first?

@loshlee OK, apparently you’ve used sudo to install the Gem so transcode-video should be somewhere in your system library path. But instead, transcode-video or a “stub” for it is inside your /usr/local directory. So, you must have used a different method to install it sometime in the past.

My advice is to manually remove all versions of the tools and other files included in the video_transcoding Gem no matter where they might be on your system. And then try to install them again.

@loshlee I’m sorry you’re having this problem. It appears your $PATH environment variable does not include the path to your Gems.

How did you originally install the video_trancoding Gem? And how did you install Ruby itself?