I can run Bash shell commands using a Ruby or irb program using backlinks (and% x (), system, etc.). But for some reason this does not work with history.
For instance:
jones$ irb --simple-prompt
>> `whoami`
=> "jones\n"
>> `history`
(irb):2: command not found: history
=> ""
Inside the Ruby program, it raises this error:
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31: command not found: history
In bash, these commands work fine
It's not that calling Ruby calls a new shell - it just doesn't find this command ...
Does anyone know why? I'm at a dead end ...
source
share