rest-nvim / rest.nvim

A fast Neovim http client written in Lua
GNU General Public License v3.0
1.61k stars 142 forks source link

can not install on windows #463

Closed mtfcd closed 2 months ago

mtfcd commented 2 months ago

log from lazy.nvim:

 rest.nvim 📂 http 
        C:\Users\cc\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
        C:\Users\cc\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory

        Error: Lua 5.1 interpreter not found at C:/Users/cc/scoop/apps/lua/current

        Please set your Lua interpreter with:

           luarocks --lua-version=5.1 --local config variables.LUA <d:\path\lua.exe>
        Failed installing rest.nvim with `luarocks`.

        --------------------------------------------------------------------------------

        Trying to build from source.
        C:\Users\cc\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory
        C:\Users\cc\scoop\apps\lua51\current\lua5.1.exe: cannot open e  -e io.write(_VERSION:sub(5)) : No such file or directory

        Error: Lua 5.1 interpreter not found at C:/Users/cc/scoop/apps/lua/current

        Please set your Lua interpreter with:

           luarocks --lua-version=5.1 --local config variables.LUA <d:\path\lua.exe>

I hava those installed use scoop:

lua                 5.4.7-2       main       2024-09-15 19:18:04
lua-for-windows     5.1.5-52      main       2024-09-13 00:40:11
lua-language-server 3.10.5        main       2024-08-25 15:21:46
lua51               5.1.5         versions   2024-09-15 19:19:19
luarocks            3.11.1        main       2024-09-15 19:18:05

lua51 is installed at:

    Directory: C:\Users\cc\scoop\apps\lua51\5.1.5

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---            2014/5/6     3:54          17920 lua5.1.exe

so I run luarocks --lua-version=5.1 --local config variables.LUA 'C:\Users\cc\scoop\apps\lua51\5.1.5\lua5.1.exe'. and I got: image

escaped \ in path to: 'C:\\Users\\cc\\scoop\\apps\\lua51\\5.1.5\\lua5.1.exe'. got the same.

KevinNitroG commented 2 months ago

I am able to reproduce this issue. Lua for Windows can be installed via the following link: https://github.com/rjpcomputing/luaforwindows. However, I would prefer to explore a more effective solution to address the problem.

boltlessengineer commented 2 months ago

Unfortunately there is nothing rest.nvim can do about this issue. This is problem with your package manager, in this case lazy.nvim.

I would like to help you but I don’t have access to any Windows machines until next year, so I recommend you to ask for a help from lazy.nvim or make an issue about this there. You will get more faster & accurate help in this way.

mtfcd commented 1 month ago

I am able to reproduce this issue. Lua for Windows can be installed via the following link: https://github.com/rjpcomputing/luaforwindows. However, I would prefer to explore a more effective solution to address the problem.

I tried this, did not work. I tried installing lua, lua51 and lua-for-windows use scoop. did not work. I tried use rocks.nvim to install rest.nvim, and rocks.nvim also could not be installed. But I installed rocks-scoop as mentioned in this tutorial. After that rest.nvim can be isntalled successfully use lazy.nvim.