def listgemsremote begin # exception trapped block commandline = $xpcommand + "gem query --remote" system( commandline+' > temp.output' ) fileName = "temp.output" @gemsqueryresult = " gem listing retrieved remotely, click below to view it. " path_to = File.join( "rwd_files", "remotegemlist.txt" ) path_from = File.join( $progdir, fileName ) FileUtils.cp(path_from, path_to) rescue @gemsqueryresult = "RubySlippers remote listing error" end # exception rescue end