Last active
April 1, 2025 23:21
-
-
Save devcfgc/99bbbd7ae2d2da950ae1 to your computer and use it in GitHub Desktop.
No such file or directory — /cygdrive/c/Ruby/bin/gem (LoadError)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//We must add the following to your .bashrc (C:\cygwin\home\user\.bashrc): | |
alias ruby='/cygdrive/c/Ruby21-x64/bin/ruby' | |
alias gem='/cygdrive/c/Ruby21-x64/bin/gem.bat' | |
alias irb='/cygdrive/c/Ruby21-x64/bin/irb.bat' | |
alias compass='/cygdrive/c/Ruby21-x64/bin/compass.bat' | |
alias sass='/cygdrive/c/Ruby21-x64/bin/sass.bat' | |
alias scss='/cygdrive/c/Ruby21-x64/bin/scss.bat' |
fish shell:
export PATH_RUBY_BIN="/cygdrive/.../Ruby/Default/bin";
function filenameRemoveExtension --argument-names filename
echo "$filename" | sed -r 's|\.[^.]+$||';
end
for file in $PATH_RUBY_BIN/*.bat
set base (basename -- "$file");
set cmd (filenameRemoveExtension "$base");
alias $cmd "$file";
end
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To load all files in the
C:/Ruby32-x64/bin
in Cygwin at once, I loop through all of them like this:Anf finally, I put this inside
~/.bash_profile
as bash doesn't automatically load~/.bashrc