Search code examples
bashterminaltunnel

I'm trying to setup showoff.io or localtunnel on a Mac, but I'm stuck


I installed the gem according to the instructions at showoff.io, but when I try to run

show 8888

it doesn't work and I get

-bash: show: command not found

In their faq, they mention running

gem contents showoff-io

if that happens, but I don't know how to read what I get:

Rakefile
Gemfile
lib/showoff/client.rb
lib/showoff/settings.rb
lib/showoff/api.rb
lib/showoff/helpers.rb
lib/showoff/version.rb
lib/showoff/setup.rb
lib/showoff/session.rb
lib/showoff.rb
bin/show

They say this:

This will list all of the files in the showoff-io gem. Look for the bin/show script. Either add that folder to your $PATH, or symlink the script into a location already on your $PATH. For example:

sudo ln -s /var/ruby/gems/.../bin/show /usr/local/bin

But obviously copy&pasting that doesn't do anything because those are just example paths.

I'm sure this is very basic, but I'm a novice at this. What do I have to do?

Thanks!


Solution

  • Run the following command to determine the directory that gem installs executable files in and then add it to you PATH.

    gem env | grep "EXECUTABLE DIRECTORY"
    

    Alternatively you can run the following command which will symlink the show command into your /usr/bin directory

    sudo ln -s $(gem env | grep "EXECUTABLE DIRECTORY" | cut -d":" -f 2)/show /usr/bin/show