How to change the Ruby installation path in Cygwin after Ruby hass been reintalled to another path?

$ ruby -v
bash: /cygdrive/c/tools/ruby23/bin/ruby: No such file or directory

I had this error because my Cygwin’s .bash_profile file contained old Ruby paths:

alias bundle='/cygdrive/c/tools/ruby23/bin/bundle.bat'
alias compass='/cygdrive/c/tools/ruby23/bin/compass.bat'
alias gem='/cygdrive/c/tools/ruby23/bin/gem.bat'
alias irb='/cygdrive/c/tools/ruby23/bin/irb.bat'
alias ruby='/cygdrive/c/tools/ruby23/bin/ruby'
alias sass='/cygdrive/c/tools/ruby23/bin/sass.bat'
alias scss='/cygdrive/c/tools/ruby23/bin/scss.bat'

I used these aliases to fix the «No such file or directory — /cygdrive/c/Ruby/bin/gem (LoadError)» issue: gist.github.com/devcfgc/99bbbd7ae2d2da950ae1