Skip to content

Welcome to Tech by Example

Menu
  • Home
  • Posts
  • System Design Questions
Menu

Turn a file path into a hyperlink in the terminal in RubyMine using Ruby Language

Posted on August 13, 2021August 13, 2021 by admin

Overview

We can prefix the file path with file:// to make it clickable in the terminal in the ruby mine editor

For example, below is how we will make the complete link

puts "file://" + {filepath}

Program

Let’s see a program for the same

Create a file named test.html with the below contents in the directory /files

<html></hmtl>

Now create a ruby file with below contents

main.rb

puts "file://" + "/files/test.html"

Run this ruby file

ruby main.rb

Output

file:///files/test.html

This path in ruby mine will be clickable

©2025 Welcome to Tech by Example | Design: Newspaperly WordPress Theme