I need to run some commands within a Ruby file, but rather than running them in Bash, because I'm on Unix, I want to run them in a different shell, called "s3sh". How can I specify the shell?
For example, in my Ruby code, I tried:
system "export RUBYSHELL=s3sh"
s3 = system "RightAws::S3Interface.new(#{S3ID}, #{S3KEY})"
system "s3.copy(#{SRCBUCKET}, #{FILE}, #{DESTBUCKET}, #{FILE})"
system "unset RUBYSHELL"
but it's not possible export environment variables to the shell the Ruby script runs in. (see "Exporting an Environment Variable in Ruby")