There are 39 students in the bike club.

All but 8 of them participated in a race.

What is the total cost if each student who entered the race paid $6?

There were 39 - 8 = <<39-8=31>>31 students who participated in the race.

Thus, the total cost is $6 x 31 = $<<6*31=186>>186. Answer: \boxed{186}.