Ok, it is working. But for gopher folder must be named cgi-bin (or cgi script will be just text file).
In gemini scripts can be executed in every folder(but i renamed it for standartization).
And of course scripts must have permission for execution (chmod +x)