I\'d like to change the pwd of the current shell from within a ruby script. So:
> pwd /tmp > ruby cdscript.rb > pwd /usr/bin
This
You can try to use system instead of exec. It works for me. Like system("cd #{new_path} && && cd #{original_path}")
system
exec
system("cd #{new_path} && && cd #{original_path}")