Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set up path for gems with the Fish shell?

How do I properly set up path for gems with the Fish shell?

sanoy@nice-system ~/D/c/h/bellevue> gem install bundle

WARNING: You don't have /home/sanoy/.gem/ruby/2.2.0/bin in your PATH, gem executables will not run. Successfully installed bundle-0.0.1 Parsing documentation for bundle-0.0.1 Done installing

documentation for bundle after 0 seconds 1 gem installed

sanoy@nice-system ~/D/c/h/bellevue> bundle install fish: Unknown command 'bundle'

config.fish file

set PATH </home/sanoy/.gem/ruby/2.2.0/bin> $PATH

set -gx PATH $PATH </home/sanoy/.gem/ruby/2.2.0/bin>
like image 745
sanoy Avatar asked Sep 01 '25 01:09

sanoy


1 Answers

It is likely better to use a dynamically updated path based on version, especially if version updates without distro updates like in Arch Linux

set -U fish_user_paths (ruby -e 'print Gem.user_dir')/bin $fish_user_paths
like image 122
Chester Wisniewski Avatar answered Sep 02 '25 16:09

Chester Wisniewski