uru error in Windows 10

This article introduces how to solve the error when using uru in Windows 10.

Background: multiple ruby versions in windows 10

I am using RubyMines and git bash in Windows 10. I have several projects with different ruby versions. So I want to use uru to switch between two different ruby versions. However, I encountered an error: "uru.ps1 cannot be loaded because running scripts is disabled on this system.”

Interestingly, when I used Command Prompt, it worked fine. The error only appeared when I used the terminal in RubyMines and git bash.

Solution

Run the following command to update the execution policy.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine

Then we can use uru in our RubyMines.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Tzung-Chien Hsieh
Tzung-Chien Hsieh

Written by Tzung-Chien Hsieh

PhD in Computer Science, I will share what I learned in Programming, Machine Learning, and Rare Disorders.

No responses yet

Write a response