Fix default gem loading in `generate_gem_table`.
Merge pull request #2587 from take-cheeze/fix_def_gem_load

Fix default gem loading in `generate_gem_table`.
fixed wandering filename problem