Install mini_racer gem on kali linux

That’ll only get you past that specific error; the linker will then fail because it’s almost certain the library isn’t installed, either. This is not a Discourse-specific problem, it’s an issue with your distro.