-
-
Save devcfgc/99bbbd7ae2d2da950ae1 to your computer and use it in GitHub Desktop.
//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' |
alias bundle='/cygdrive/c/Ruby22-x64/bin/bundle.bat'
thx!
For RailsInstaller
alias ruby='/cygdrive/c/RailsInstaller/Ruby2.3.0/bin/ruby.exe'
alias gem='/cygdrive/c/RailsInstaller/Ruby2.3.0/bin/gem.cmd'
alias bundle='/cygdrive/c/RailsInstaller/Ruby2.3.0/bin/bundle.bat'
alias rails='/cygdrive/c/RailsInstaller/Ruby2.3.0/bin/rails.bat'
I like to use a variable for the directory as such:
export RUBYBIN=/cygdrive/c/Ruby24-x64/bin
alias ruby=$RUBYBIN/ruby
alias ruby.exe=$RUBYBIN/ruby.exe
alias gem='$RUBYBIN/gem.bat'
alias irb='$RUBYBIN/irb.bat'
alias compass='$RUBYBIN/compass.bat'
alias sass='$RUBYBIN/sass.bat'
alias scss='$RUBYBIN/scss.bat'
For Ruby25
I had to use gem.cmd
instead of gem.bat
:
# ruby aliases
export RUBYBIN=/cygdrive/d/programs/Ruby25-x64/bin
alias ruby="$RUBYBIN"/ruby
alias gem="$RUBYBIN"/gem.cmd
alias bundle="$RUBYBIN"/bundle.bat
Thanks guys!!
There are the alias for jekyll too:
# ruby aliases
export RUBYBIN=/cygdrive/c/Ruby25-x64/bin
alias ruby="$RUBYBIN"/ruby
alias ruby.exe=$RUBYBIN/ruby.exe
alias gem="$RUBYBIN"/gem.cmd
alias bundle="$RUBYBIN"/bundle.bat
alias bundler="$RUBYBIN/bundler.bat"
alias jekyll="$RUBYBIN/jekyll.bat"
Hi, in cygwin when i use "$ Ceedling" command, i am facing the same issue as written below:
"C:\Ruby23\bin\ruby.exe: No such file or directory -- /cygdrive/c/Ruby23/bin/ceedling (LoadError)"
I tried with changing the .bashrc file but still error is not going. I have replaced the "rubyx.y." in the given code with "ruby23", as it is the version installed in my pc. Any new solution i can try?
Ruby installed version : 2.3.1p112
Ceedling version : 0.28.3
Thank you.
To load all files in the C:/Ruby32-x64/bin
in Cygwin at once, I loop through all of them like this:
export RUBY_BIN="/cygdrive/c/Ruby32-x64/bin"
for file in $RUBY_BIN/*.bat; do
base=$(basename -- "$file")
cmd="${base%.*}"
alias $cmd="$file"
done
Anf finally, I put this inside ~/.bash_profile
as bash doesn't automatically load ~/.bashrc
update:
alias ruby='/cygdrive/c/Ruby22-x64/bin/ruby'
alias gem='/cygdrive/c/Ruby22-x64/bin/gem.bat'
alias irb='/cygdrive/c/Ruby22-x64/bin/irb.bat'
alias compass='/cygdrive/c/Ruby22-x64/bin/compass.bat'
alias sass='/cygdrive/c/Ruby22-x64/bin/sass.bat'
alias scss='/cygdrive/c/Ruby22-x64/bin/scss.bat'