Jump to content

Workflow cannot load Ruby-gem


Recommended Posts

Hi,

 

I've created a workflow that executes a ruby-script (language is set to '/bin/zsh'). The ruby-script works (without errors) when I run it from the terminal, but it doesn't when I invoke the workflow.

 

The Alfred-debugging Log says 'cannot load such file -- combine_pdf' (combine_pdf is a gem I use in the script).

 

I've tried removing an (1) reinstalling the gem, (2) a different ruby-version (using rvm), (3) setting the explicit rvm-ruby path in the Workflow's Script-field (not just 'ruby' but '/Users/[me]/.rvm/rubies/ruby-3.3.4/bin/ruby').

 

The workflow used to run fine on my old MacBook (I've compared all the settings between the two Macs, they are the same as far as I can tell).

 

Does anyone know a solution? Or an any other directions I can search for one?

 

Thanks,

 

Bart Visser
macOS Sonoma 14.6.1
Alfred version 5.5

Link to comment

See Understanding the Scripting Environment. It’s bound to have the explanation you seek and the solution.


For future reference, it is very hard to diagnose something from a description alone. You should always share your workflow (preferably a simplified version that shows the issue without doing extra stuff) so other people can properly investigate. transfer.sh is good temporary storage if you don’t have anywhere else to host it.

Link to comment

Hi Vitor,

 

Thanks for your help. Next time I'll share the workflow. I fiddled a bit with the suggestions in the Scripting Environment-explanation. In the end a typical MS Windows-solution worked: I restarted my Mac. Now everything is running smooth.

 

Thanks again,

Bart

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...