To temporarily change the current working directory in Ruby, call Dir.chdir with a block. The previous working directory will be restored when the block ends:
Dir.chdir('/usr/local') do
# do stuff in /usr/local
end
UI/UX Design by
We make sure that your target audience has the best possible experience with your digital product. You get: