fix missing gcc warning for mounting rubies, fix #1681