lisamelton / other_video_transcoding

Other tools to transcode videos.
MIT License
540 stars 24 forks source link

Mac Path issue - What's the fix for this, please? (Gem::GemNotFoundException) #173

Closed loshlee closed 1 year ago

loshlee commented 1 year ago

"/opt/homebrew/Cellar/ruby/3.2.0/lib/ruby/3.2.0/rubygems.rb:265:in `find_spec_for_exe': can't find gem other_video_transcoding (>= 0.a) with executable other-transcode (Gem::GemNotFoundException)"

I know.

I have a basic lack of understanding about how this update to the Ruby framework must be handled for other_video_transcoding. It's just that it makes me feel so old. Thanks.

lisamelton commented 1 year ago

@loshlee I don't have enough information to know exactly what's going on with your system, but I would guess that you've updated something, likely Ruby itself, and the path to your previously installed gems are no longer in your system $PATH variable.

Try running gem environment to see if anything looks wrong.

loshlee commented 1 year ago

Thanks so much! There's Ruby 3.2.0 folder now, but I don't know what to do, because mine is in /opt/homebrew/lib/ruby/gems/3.1.0. I didn't know "brew upgrade" could sabotage me like this.

lisamelton commented 1 year ago

@loshlee You need to change the definition of your $PATH variable in your command line shell's profile. If you're using BASH, that's ~/.bash_profile. For ZSH, that's .zprofile. They restart your Terminal program.

After than you need to reinstall the other_transcoding Gem to the new location.

loshlee commented 1 year ago

What worked was "gem install other_video_transcoding". I don't know why that was needed, but it's working again now. Thanks again.

loshlee commented 1 year ago

I haven't upgraded to Ventura yet because I'm very afraid of the change from Preferences to Settings, but I use "ohmyzsh", and I have 4 environment files that I try to keep an eye on (I keep a folder with symbolic links to them in ~/). One of those symbolic links points to ~/.bash_profile, but the only reference to "gem" is commented. However, my .zshrc file contains "export PATH=/opt/homebrew/lib/ruby/gems/3.1.0/bin:$PATH". Might I have avoided this issue if I had added "export PATH=/opt/homebrew/lib/ruby/gems/3.2.0/bin:$PATH" to that file after I noticed that gem had been updated to 3.2.0? Thanks.

lisamelton commented 1 year ago

@loshlee That might have avoided the re-install for other_transcoding but might have caused other problems as well.

Again, I don't know enough about your entire environment to say for sure.

loshlee commented 1 year ago

Looks as though I need to do a better job of formatting my replies, sorry. Good thing the Preview switch is so close by. The problem was trivial (not for me so much), but the Ruby gem environment either washed out my other_video_transcoding because of its routine update mechanism, or because of something I did. Anyway, no problem. Thanks again.