You did a pretty poor job of installing luarocks.
I've never heard of it, but simply going to their build instructions reveals:
Run ./configure. (This will attempt to detect your installation of Lua.
If you get any error messages, see the section "Customizing your settings", below.)
And...