What are the benefits of using FileUtils methods http://ruby-doc.org/core/classes/FileUtils.html than the equivalent Bash commands?
They are easier to call from inside Ruby scripts because they accept Ruby objects as arguments. This means that you don't have to handle escaping and what not every time you call them.
when you farm stuff out to the shell, you are adding a dependency on those apps. FileUtils is pure ruby, so it works (and works the same, more or less) anywhere that ruby works.
I would not say there is no benefits in using Ruby's FileUtils, since you can use them anywhere you have Ruby( especially if your task is in web development). But that does not mean you can't use those shell tools in other platforms as well. Yes, you can write your scripts in *nix shell, and you can run them as well with little or no modification in, say, Windows using cygwin or GNU win32.(and others). In terms of benefits of Ruby's FileUtils against shell's, its only minimal, since what you can do with FileUtils you can do also with shell's.
Over and above the fact that you don't have to worry about ensuring your target platform has the specific tools you're using installed, and over and above the problem of doing proper quoting of shell oddities (especially problematical if you target both Windows and Unix-alikes -- Cygwin, GNUWin32, etc. notwithstanding), if you use Ruby's FileUtils you have the moderately-sized overhead of a Ruby function call while if you use external utilities you have the rather sizable overhead of firing up an external process each and every "call".
- Works across multiple platforms
- Does not spawn a new process to issue the command (so it consumes less resources)