Wrong Lua path for openresty (Lapis).

For background, and to run though this yourself, see Getting Started With Lapis.
Running 'lapis server' and opening http://localhost:8080/ results in:
2014/10/20 01:47:01 [error] 29305#0: *1 lua entry thread aborted: runtime error: /home/bdjnk/Projects/LoE/web.lua:1: module 'lapis' not found:
no field package.preload['lapis']
no file '/usr/local/openresty/lualib/lapis.lua'
no file '/usr/local/openresty/lualib/lapis/init.lua'
no file './lapis.lua'
no file '/usr/local/openresty/luajit/share/luajit-2.1.0-alpha/lapis.lua'
no file '/usr/local/share/lua/5.1/lapis.lua'
no file '/usr/local/share/lua/5.1/lapis/init.lua'
no file '/usr/local/openresty/luajit/share/lua/5.1/lapis.lua'
no file '/usr/local/openresty/luajit/share/lua/5.1/lapis/init.lua'
no file '/usr/local/openresty/lualib/lapis.so'
no file './lapis.so'
no file '/usr/local/lib/lua/5.1/lapis.so'
no file '/usr/local/openresty/luajit/lib/lua/5.1/lapis.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
I took a look around and found that /usr/local/openresty/luajit/include/luajit-2.1/luaconf.h says this:
** Note to distribution maintainers: do NOT patch the following lines!
** Please read ../doc/install.html#distro and pass PREFIX=/usr instead.
#define LUA_LROOT "/usr/local"
The issue can be fixed by adding package.path and package.cpath to nginx.conf, like so:
http {
lua_package_path './?.lua;/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua;/usr/lib/lua/5.1/?.lua;/usr/lib/lua/5.1/?/init.lua';
lua_package_cpath './?.so;/usr/lib/lua/5.1/?.so;/usr/lib/lua/5.1/loadall.so';
And that's as far as I've gotten in an hour of bumbling about.
This seems like it could be an openresty package problem, but I'm not sure where exactly the fault lies, let alone where a fix might fit.
Last edited by bdjnk (2014-10-20 06:16:56)

Manually setting lua_package_path and lua_package_cpath for nginx had unexpected negative consequences. My current work around is simpler.
# ln -s /usr/share/lua /usr/local/share/lua
# ln -s /usr/lib/lua /usr/local/lib/lua
Maybe I should try this on openresty pre install
$ sed -i -e 's/\/local//g' PKGBUILD
I'll do it when I have some time to mess with it.

Similar Messages

  • Wrong ICF path used for BSP link in role

    Hi,
    I've added a BSP to the menu of a role.
    When I start the BSP from the role menu in PFCG it starts the BSP as supposed.
    If I go to the browser and look at the Web template with the role menu, I see my BSP link has a wrong ICF path:
    http://server.web.bc:8000/sap/bw/BSP_APP/default.htm
    but the BSP_APP is under:
    sap/bc/bsp/sap/BSP_APP
    Is there somewhere a default setting that sets the ICF path to: sap/bw for Web application templates?
    Regards,
    Eric

    Nothing much happening on this topic...
    In the mean time I found out there is a table HTTPURLLOC which allows an exception setting.
    I added the entry:
    040    010    HTTP   /BSP/SAP/*    SAPBWBIP.WEB.BC    8000
    but this doesn't appear to change things.
    Still don't know why it is using '/sap/bw' as default prefix and not '/sap/bc/bsp/sap'.
    If I launch the menu item from PFCG, it goes well.
    From within the webtemplate on the role menu it doesn't work.
    Very frustrating...
    Anyone who can shed some light on this?
    Regards,
    Eric

  • HT203167 the path for several of my songs that i can't locate is wrong because the path uses forward slashes instead of back slashes.  Can I change this?

    several of my songs in itunes gives me the can't locate ! sign.  in going to the info for each of those songs i noticed the path to locate the file was in proper format except for the slash marks which were / instead of \ .  how can i change the slash makrs in the paths for those songs?

    thanks for the info.  if itunes is applying the wrong path i.e. - forward slashes in path instead of backward slash how will i ever access those songs I've purchased.  it won't let me download them again because it thinks they are on my computer? 

  • How to create search path for the file on the desktop..

    hello experts..
          I have used gui_upload module to upload the data from flatfile to the internal table, in that how can i create search path for the file selection in the selection screen, also please help me the code to update the ztable.
    thanks

    HI
      If iam not wrong you want to select a file from a location that you don't know so if this is ur problem then use the function module
    F4_FILENAME
    this FM helps to locate and select the desired file from the system.
    Sample code that you can check is
    How to get windows filename
    PARAMETERS: lv_file LIKE rlgrap-filename.
    Method 1
        CALL FUNCTION u2019KD_GET_FILENAME_ON_F4u2019
        EXPORTING
        MASK = u2019,.txt,.*u2019
        STATIC = u2019Xu2019
        CHANGING
        FILE_NAME = LV_FILE.
    Method 2
    CALL FUNCTION u2019F4_FILENAMEu2019
    EXPORTING
             program_name = syst-cprog
             dynpro_number = syst-dynnr
             field_name  = u2019 u2019
         IMPORTING
             file_name   = LV_FILE.
    Regards
    Pavan

  • Folder path for developing custom UI in SAP OEE

    Hi,
    recently I was developing in a scenario where I need to add a custom UI in OEE Dashboard. For that I followed the SAP How to guide for Custom UI. As per the guide I developed the view.js file controller.js file and then set them in activity configuration. It was stated in the how to doc that we have to put upto the name of the view page not the extension. Interestingly I found one thing here.
    OEE always expects a folder path for that view file is such a way http://<host>:<port>/<Project name>/Web/WebContent/customActivity/<View page>.
    Main problem to use that is, we can't add any specific folder in between any of the folder and even we can't change the name of the folder. I have tried with "customactivity", it didn't work.
    I think this kind of limitation anyone can't expect while developing. I just post this here to explore that if I am doing anything wrong or that is a issue. Another point is in the how to doc it is not mentioned anywhere.
    Thanks and Regards,
    Suman

    Hi All,
    This is for everyone's update.
    I have raised this point to the SAP, they have sent the confirmation that they have wrote their logic in such a way, so we have to mention the same path while developing any custom UI for SAP OEE. But as per my understanding it is kind of limitation they are giving.
    So the standard path to keep the custom UI code for any SAP OEE Custom UI is :
    http://<host>:<port>/<Project name>/Web/WebContent/customActivity/<View page>
    Regards,
    Suman

  • Set $PATH for current session in Terminal

    Hello,
    I want to modify the environment variable $PATH for the current terminal session. To modify it in $HOME/.profile (etc) is no option.
    So I created a shell script called envsetup.sh which contains
    ATLAS_HOME=/Applications/Development/atl-plugin-sdk
    PATH=$ATLAS_HOME/bin:$PATH
    export ATLAS_HOME PATH
    When I execute the script, $PATH will only modified while running the script but does not alter it for the current session. But then I copy and paste it into the terminal, $PATH gets modified for the current session. What's wrong with it? On my Linux box, it works ...

    Linux box, it works ...
    This CANNOT work on your Linux box.
    When you run a shell script (Mac OS X, Linux, HP-UX, Solaris, Tru64 UNIX, AIX, etc...), the shell script is runs in a child process. Any environment variables set or changed in that child process get destroyed when that child process ends, which happens as soon as the script ends. The parent process (your shell) will never see those child process environment variables. This has been true since the earliest versions of UNIX that I am aware of, and that goes back to at least '79.
    Alternative approaches. You could create a shell function in your .profile
    envsetup()
    export ATLAS_HOME="/Applications/Development/atl-plugin-sdk"
    export PATH="$ATLAS_HOME/bin:$PATH"
    The next time you login, your .profile will run and you will have a new command "envsetup". When you invoke the command envsetup it will run within the context of your current shell, so those environment variables will be set and visible.
    You could also create an alias that sources your envsetup.sh
    alias envsetup 'source /path/to/envsetup.sh'
    This would give you an easy to call command that would source into the current shell the export commands, as well as provide you with a script that can be sourced into other scripts that happen to need those specific exports.
    Message was edited by: BobHarris

  • Path for data loader

    Hi
    When I try to launch the dataload play user in DEV instance
    i am given error about wrong dbc file being used
    i check it
    its shows a wrong path for my dbc file
    any idea where to change this path
    OS id RHEl 5
    DB 11.2.0.1
    EBS 12.1.2

    Hi
    Is the value of the variable "s_fnd_secure" in the $CONTEXT_FILE the same as the value of $FND_SECURE environment variable?
    It probably is, but it can't hurt to check.
    Have you tried stopping the Apps Web processes (and making sure that there are no process running on the O/S) and then restarting the web server?
    This test might be useful ..
    1) http://server:port/OA_HTML/jsp/fnd/aoljtest.jsp
    2) Click on "Enter AOL/J Setup Test"
    3) Run these two tests
    a. Locate DBC File
    b. Verify DBC Settings
    Regards
    Frank

  • Help to evaluation path for ESS

    Hi
    I have to make a report/list in the portal, where an employee can see i.e. the birthday of all the colleagues directly under the employees manager.
    Is there a standard evaluation path for this ? Or can someone point me in the right direction (and remember I am new to evaluation paths)
    Thanks
    /Jakob

    Hi Siddharth 
    Thank you for your reply.
    I have created the evaluation path as you described, but when I test it using PPSS, with the following data :
                                                                                    Objekttype           P   Person                                               
    ObjektID             00032422      ib                                         
    Betegnelse           ib, ibsen                                                                               
    Evalueringsvej       Z_ess_co  Test af at finde hvilke objekter der er løn på t
                                                                                    Behandlingsperiode   28.09.2008  til  31.12.9999                                                                               
    Where the person "00032422" is part of an organization with several employees. I was expecting a list of employees directly under the manager of employee "00032422".
    Anything I have misunderstood or done wrong?
    Thanks
    /Jakob

  • Relative path for images in RTF templates

    Hi everybody!
    When I insert an image in a RTF template, I put its path into the web dialog, in order to see correctly the picture when I open the report from the xmlp server, in this way: url:{"http://servername/analytics/res/Images/image.bmp"}
    How can I make this path relative, in order to see the images even if the server name changes?
    Thanks so!
    Francesco

    Hi Tim,
    I am using BIP 10.1.3.3.2. I am able to access system variable CURRENT_SERVER URL.
    Steps:
    <?param@begin:CURRENT_SERVER_URL?>
    <xsl:value-of select="$ CURRENT_SERVER_URL"/>
    CURRENT_SERVER_URL is getting printed in BI Publisher. Value displayed is http://xx4697.xxx.co.in:9704/xmlpserver.
    Now we are importing xsl into RTF template. File aaa.xsl is stored at [BIP_Installation_Directory\oc4j_bi\j2ee\home\default-web-app]
    We have hardcoded the path for XSL in RTF. The path is <?import: http://xx4697.xxx.co.in:9704/aaa.xsl?>
    As we want to set dynamic path we changed hardcoded xsl path to <?import: {$CURRENT_SERVER_URL}/../aaa.xsl?> but it is not working. Sometimes BIP is taking local path of MyDocuments folder and sometimes Desktop path. If I put that XSL file in MyDocuments folder or Desktop, it is working fine. But ideally it should refer [BIP_Installation_Directory\oc4j_bi\j2ee\home\default-web-app] path...
    Thanks,
    Amit D

  • Search c:\ drive and return file path for winword.exe and save as variable

    Hi all, here is what I'm trying to do;
    1. Search C:\ drive for winword.exe
    2. take the file path and save it as a variable.
    3. Then based on the path value, use the switch statement to run "some command" 
    Essentially I'm trying to find what the file path for winword.exe is, then run a command to modify the registry.  I already have the script that will modify the registry like I want but the problem it, the path is hard coded in the script, I want to
    now look for all versions of word and set the right file path so I can make the right registry changes.

    This should get you started:
    http://ss64.com/ps/get-childitem.html
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • Css/js relative path for embedded server

    We have recently begun using relative paths for css and js files in our deployed applications:
    <link href="../../resources/css/global3.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" src="../../resources/script/globalScript.js" type="text/JavaScript"></script>
    I cannot figure out where to put the resources folder on my local machine so the pages will link correctly when running a project on my embedded server in JDev. Can anyone please help?

    Hi,
    the embedded OC4J has its configuration files at
    \jdeveloper_installdir\jdev\system\oracle.j2ee.<version>\embedded-oc4j
    However, if you use relative addressing then web applications try to find them relative to the public_html directory of the Viewlayer project
    Frank

  • Get the relative path for java class

    How to get Relative path for java class which is inside in web-inf directory in webapps

    ajay.manchu wrote:
    Hi gimbal2,
    My Requirement is i need to run a java class from batch file,when i created batch file in that i need to mention the complete path of the java class,so instead of mentioning that i want to provide only java class name,thats why i asked that one..
    can u help me regarding that....
    Thanks in advanceI wonder how that would work then. Let's take a fictive example. You have a class com.mycompany.myapp.Foo. This would mean that the class is stored in some directory like this:
    c:/webrootdir/myapp/WEB-INF/classes/com/mycompany/myapp/Foo.classTo be able to run such a class from the commandline using Java, you would have to invoke this command:
    java -cp c:/webrootdir/myapp/WEB-INF/classes com.mycompany.myapp.FooHow would knowing the exact path to this class help you?

  • Using relative path for in file/ftp adapter

    Hi All,
    How to have a relative path for file/ ftp adapter's inbound/outbound operation?
    Example: Consider $ORA_HOME = /home/oracle --> This environment variable can be different on different machines
    i want to drop a file in to $ORA_HOME/folder1/folder2 (Or poll for a file).
    <partnerLinkBinding name="FTP">
    <property name="wsdlLocation">FTP.wsdl</property>
    <property name="out_dir" type="LogicalDirectory">What do i write here???</property>
    <property name="retryInterval">60</property>
    </partnerLinkBinding>
    if i cant configure this in partner link section or in activation agent sction, how else do i achieve this?
    i am using 10.1.3.* version.
    Thanks in advance.
    Roshan.

    You can achive it using the deployment scripts if the directory is changing on the basis of the environment
    If you want to change at run time than you can use the jca properties to set using the variables at runtime.
    Regards,
    Ajay

  • Relative path for servlet property file.

    I have the following java file. When I use the absolute path for the configFile, it works. I would like to know how I could use it as relative path as in installation, the name of the directory could change.
    How do I fix the problem? Thank you.
    ---------------------- LoadProperties.java ----------------
    import java.util.*;
    import java.io.*;
    public class LoadProperties {
    private String driver="";
    private String dbURL="";
    private String login="";
    private String password="";
    static public void main(String[] args) {
    LoadProperties lp = new LoadProperties();
    } // main
    public LoadProperties() {
    //String configFile = "C:/1LMS/web-app/WEB-INF/config/db.properties";
    String configFile = getClass().getResource("config/db.properties").toString(); <--- This line could not find the db.properties file.
    Properties Prop = new Properties();
    try {
    FileInputStream configStream = new FileInputStream(configFile);
    Prop.load(configStream);
    configStream.close();
    } catch(IOException e) {
              System.out.println("Error: Cannot laod configuration file ");
    driver =Prop.getProperty("driver");
         dbURL = Prop.getProperty("dbURL");
         login = Prop.getProperty("login");
    password = Prop.getProperty("password");
    printResult();
    } //Load Property
    private void printResult() {
         System.out.println("Driver = " + driver);
         System.out.println("dbURL = " + dbURL);
         System.out.println("Login = " + login);
    System.out.println("PSWD = " + password);
    } // class

    hi there,
    had the same problem... you need to use following API:
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String)
    In your case something like that:
    // get the servlet context
    ServletContext context = getServletContext();
    // directory name where the file is located
    String realPath = context.getRealPath("/config");
    // get real path to your file
    String propertyPath = real+"filename.txt";
    hope that helps!!
    minu

  • Relative Path for Jquery into Content Editor Web Part

    Hi;
    I'd add a Content Editor Web Part (CEWP) to a web part zone. I'd edit that CEWP in HTML view and add my script which load Jquery and my question :  how to use a relative
    path for Jquery :
    <SharePoint:ScriptLink Name="SP.js" runat="server" OnDemand="true"
      Localizable="false" />
    <script src="/sites/XXX/Style%20Library/Scripts/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    My code
    </script>
    Regards

    Hi;
    Firstly, I have used : 
    <script src="/Style%20Library/Scripts/jquery.min.js" type="text/javascript"></script>
    But any result and any change and If I add /Sites/XXX/ : it works correctly ?
    My code is :
    <SharePoint:ScriptLink Name="SP.js" runat="server" OnDemand="true"
        Localizable="false" />
    <script src="/sites/XXX/Style Library/Scripts/jquery.min.js" type="text/javascript"></script>    
    <script type="text/javascript">
    ExecuteOrDelayUntilScriptLoaded(displayTitle, "SP.js");
    var site;
      var context;
      function displayTitle() {
        //Get the current client context
        context = SP.ClientContext.get_current();
        //Add the site to query queue
        site = context.get_web();
        context.load(site);
        //Run the query on the server
        context.executeQueryAsync(onQuerySucceeded, onQueryFailed);
    function onQueryFailed(sender, args) {
      alert('request failed ' + args.get_message() +
        '\n' + args.get_stackTrace());
    function onQuerySucceeded(sender, args) {
        $("#layoutsTable table th span").html("Bienvenue sur le site " + site.get_title() + " - Direction Technique");
        $("#zz17_V4QuickLaunchMenu ul.root li span:contains('Biblioth')").parent().parent().hide();
        $("#zz17_V4QuickLaunchMenu ul.root li span:contains('Listes')").parent().parent().hide();
    </script>

Maybe you are looking for

  • Problem Mapping

    I am making mapping with software Stylus, soon to transfer it to XSLT TOOL. But this type of mapping this not working. The tests with MM of XI were made and I do not have problems. So that it can be happening?  The scenario is File - XI - RFC Help me

  • Mac loses wi-fi connection after sleep

    Since I upgraded to Mountain Lion, every time I wake my Macbook from sleep, I have to manually reconnect with my wi-fi router, and sometimes it takes upwards of a minute before Airport even senses the various routers within range, includng mine. Befo

  • ETC Directory missing from the KM Content directory in EP

    Dear experts The etc directory is missing from the KM Content Directory in Enterprise Portal. It's appearing for some of the application servers and missing from some. Please find the settings in the file system repository Prefix (must start with /):

  • Logs for Oracle Fail Safe

    Hi Guys I need to know where Oracle writes logs for Fail Safe components, Fail Safe Manager and Fail Safe server? Any idea? Regards PG

  • How to disable Color Management using HP Inkjet 6988

    Hi: When printing in Photoshop CS4 it says to make sure you turn off Color Management in your printer. How do I turn off Color Management in my HP Inkjet 6988? Any help will be very much appreciated. Gus Hallgren aka unclegus24