Git Product home page Git Product logo

Comments (8)

leite avatar leite commented on August 20, 2024

sorry, but your env is messed up since it is using Lua 5.2 and gin rockspec says it is Lua 5.1 only! openresty is Lua 5.1 (luajit)

as you stated, gin installation guide uses lua package from brew repositories, as I can see lua package was upgraded to version 5.2 roughly 12 months ago.

I cannot confirm this (since I do not own a macintosh), but I think your luarocks installation is using your local lua (5.2) not luajit vm.

you should consider using luajit only or luajit with lua51 packages together.

please let us now if it works, if so documentation need to be upgraded :D

from gin.

istr avatar istr commented on August 20, 2024

+1 for @leite s comment

from gin.

idevz avatar idevz commented on August 20, 2024

it's a lua version problem, use lua5.1 will fix this, @leite you mean gin base on lua5.1? but in the [rockspec], it says

dependencies = {
    "lua = 5.2",

from gin.

leite avatar leite commented on August 20, 2024

sure @idevz it is Lua 5.2 sorry :|

but openresty is Lua 5.1 (luajit) and not compatible with Lua 5.2 and agentzh made that clear in #204, #343 and #354

I set up a fork with busted 2 and make that work with Lua 5.2, see: travis/leite/gin and I'm afraid it wont interop with openresty.

@ostinelli should switch to Lua 5.1 or remove it as proposed in #27.

from gin.

istr avatar istr commented on August 20, 2024

Still having >= 5.1 in my fork, but @leite is right: in reality only = 5.1 could interoperate with OpenRESTY. I never realized that, though, because I am using a custom build (using LuaJIT only and a non-global luarocks setup), like agentzh does.

from gin.

idevz avatar idevz commented on August 20, 2024

yes, Base on Luajit Openresty get such a highly performance, and Luajit base on lua5.1, thus Gin is better to use only lua5.1.

from gin.

ostinelli avatar ostinelli commented on August 20, 2024

Thank you all for this contribution.

from gin.

ostinelli avatar ostinelli commented on August 20, 2024

I've also updated the installation docs.

from gin.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.