Empty folders Javascript and Ruby