Edited in 15 april 2015:
If you never heard of Haiku according with Wikipedia: Haiku is a free and open-source operating system compatible with the now discontinued BeOS. Since it implements the POSIX API we can run many Unix compatible software like the Lua interpreter, LuaRocks and some Lua libraries.
Boot on VirtualBox and use the app HaikuDepot to install lua and lua_devel
Search for lua
Check the option Develop Packages on the menu Show
Install the package lua_devel and you will probable be asked to install the package lua too, if not do it yourself.
Since git is pre installed you can go on and clone LuaRocks and build it. You will need to pass three flags, --with-lua for where is the bin folder where the Lua interpreter binary is, --with-lua-include for the Lua headers and --prefix for where you want things to be installed.
$ git clone https://github.com/keplerproject/luarocks $ cd luarocks $ ./configure --with-lua=/system --with-lua-include=/system/develop/headers --prefix=/Haiku/home/.lua $ make -j3 build $ make install
Use LuaRocks's command path to set Lua's path and cpath, and add LuaRocks bin folder to PATH
eval `./.lua/bin/luarocks path` export PATH=$PATH:~/.lua/bin/
Clone LuaSocket and install with luarocks:
$ git clone https://github.com/xspager/luasocket $ cd luasocket $ luarocks make luasocket-scm-0.rockspec
$ cd ~ $ sailor create sailor_test $ cd sailor_test $ lua start-server.lua