this is a function I have in nsis script:
Function rubyDependencies
DetailPrint "Installing Web Runtime Environment dependencies..."
ExecWait "gem install rails –v2.3.8"
ExecWait "gem install rake –v0.8.7"
ExecWait "gem uninstall rake –v10.0.3"
ExecWait "rake gems:install"
DetailPrint "Dependencies installed."
FunctionEnd
I have tried:
ExecWait '"gem install rails -v2.3.8" $0'
And nothing was displaying on $0, but gem list remained empty.
Any help?
Thanks, Telmo Cardoso
EDIT: I'm still having problems. I'm now using:
nsExec::ExecToLog '"$INSTDIR\runtime\ruby\bin\gem.bat" install --ignore-dependencies --no-rdoc --no-ri rails -v=2.3.8'
And its generating:
could not find a valid gem '-v=2.3.8'
and install latest one. So clearly something weird its being passed in the parameter. When I run the command outside installer, it works as supposed.
Any help?
The correct syntax is ExecWait '"c:\\full\\path\\to\\program.exe" param1 "space param" param3' $0
. For ExecWait '"gem" ...'
to work, gem.exe needs to be in a path searched by CreateProcess ...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.