leafo / lapis

A web framework for Lua and OpenResty written in MoonScript
http://leafo.net/lapis/
MIT License
3.14k stars 247 forks source link

Lua 5.1 Support #789

Closed r0b0t-0 closed 4 months ago

r0b0t-0 commented 4 months ago

Hi. I only have Lua 5.1.5 on my Mac as I am primarily working on a DEFOLD project. I have ensured that my LUA_PATH and LUA_CPATH points to 5.1.5. "which Lua" returns my 5.1.5 binary and "lua" in the terminal gives me the 5.1.5 prompt. Luarocks force installs Lua 5.4.7, which I delete thereafter. The problem is that lapis seems to require 5.4 and the error I get when running lapis serve or lapis new is that a files in /opt/homebrew/opt/lua/bin/lua5.4: cannot execute: No such file or directory. I really do not want 5.4.7 because it takes over my terminal.luarocks-51 is deprecated and I cannot find a luarocks that would give me a working lapis. Any ideas on how to get a lapis that works with 5.1

leafo commented 4 months ago

You can instruct LuaRocks to use a specific version of Lua with the --lua-version 5.1 flag. Make sure you use that flag when installing Lapis and any related dependencies.

r0b0t-0 commented 4 months ago

Thanks so much for a very quick reply! I will give that a try today.