I'm trying to launch Cygwin version of ruby.exe from a .NET application, but I'm stuck.
c:\>"c:\cygwin\bin\ruby.exe" c:\test\ruby.rb
/usr/bin/ruby: no such file to load -- ubygems (LoadError)
As you see Ruby can't locate libraries because it's looking some Linux style paths.
Obviously when I run ruby.exe from .NET since it can't find libraries it fails like above.
If I don't load any library it works fine :
c:\>"c:\cygwin\bin\ruby.exe" -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]
Originally cygwin starts with this cygwin.bat
chdir C:\cygwin\bin
bash --login -i
How can I make .NET to first go into cygwin enviroment and then execute ruby in that enviroment ?
- I can't use Windows Ruby, I need to cygwin ruby.
- I'm aware of potential usage of interactively driving "bash" but that sounds dirty, unless there is nice way of doing it.