Sperm.
I'm going to assume you're working on the Skitty-searching mission. The trash can that Skitty can be found in is in the area south of the Ranger Base in Fall City. Make sure you have a Pokemon with the Tackle ability. Go left and then up - there will be two trash cans. Skitty is in the one on the right.
Assuming the 9th badge is the Vermilion City badge (the only gym with an electric fence), you have to randomly find the first trash can switch. An adjacent trash can will have the second switch, but you have to guess. There is no way to find out about the second trash can.
you find the two switches then you can beat LT.Surge PS:check the garbage cans in the gym.
For the gym doors in cinnabar city, you must go deep into the Pokemon Mansion; on a table you will find the key. The Viridian City gym is the eighth and final gym. After you defeat Giovanni at Silph Co., you will be able to enter the gym and get your final badge. Good luck!
Check the trash can's in the gym eventually you should find a switch now there are 2 switches the next switch will be next to the trash can you found the switch in if you check that one you should find the other switch if you picked the wrong can you must start over.
The Switches to get to Lieutenant Surge in his gym are in the trash cans in his gym.
Find the two switches in the trash cans in the gym. To do this, go to a trash can and press the A button.
find 2keys in the trash cans, that will open the door
You are probably not referring to Vermilion gym, but here goes: To be able to get to Lieutenant Surge you need to find the trash-can with the hidden button press it and find the adjacent trash-can with the second button. Any trash can next to it might have the button don't matter which direction (left, right, up or down). If you don't guess correctly the trash-cans reset and you must find the right one. If you are referring to Fuchsia City to reach Koga use this image to guide you: http://www.psypokes.com/frlg/images/fuschiagym.png
inside the gym, they just look like poles though
Check the trash cans in the gym eventually you will find one switch now the check the trash can right next to it this can mean the one above it and the door will be opened.
go into the when you battle all the trainers there the juggler saids there buttons in the trash can if you push the button in the trash can it will be right next to it.
If its the game im thinking of then Lieutenant Surge
In G/S/C, the 9th gym is the first you battle when you reach Kanto's Vermillion City, the leader Lieutenant Surge.
Beat the gym trainers, but this is the short answer. Search every trash can for a door switch. If you find the first, then the 2nd is to the right of it.
You have to find the two switches in the trash cans that are in the gym.
Check the trash cans in the gym one of them will have a switch inside once you press it check the can next to the one where you found the switch you will find the other switch now you can reach the gym leader. NOTE: When i say next to the trash can with the switch in it this can also mean the one above it or below so try both ways.