datafile
datafile copied to clipboard
Luarocks loader not used
I'm getting the following error on Ubuntu 16.04 running on GCE:
file 'src/fhir-data/fhir-elements.json' not found:
can't open /usr/local/share/lua/5.1/src/fhir-data/fhir-elements.json: No such file or directory
can't open /usr/share/src/fhir-data/fhir-elements.json: No such file or directory
can't open /usr/lib/src/fhir-data/fhir-elements.json: No such file or directory
can't open ./src/fhir-data/fhir-elements.json: No such file or directory
The file is installed at /usr/local/lib/luarocks/rocks/fhirformats/1.0-1/src/fhir-data/fhir-elements.json, it just seems the luarocks loaded is not being used to find it. Both fhirformats and datafile are installed through luarocks:
$ luarocks list
Installed rocks:
----------------
datafile
0.3-1 (installed) - /usr/local/lib/luarocks/rocks
[...]
fhirformats
1.0-1 (installed) - /usr/local/lib/luarocks/rocks
Some debugging information:
$ lua
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
> require, "luarocks.path"
stdin:1: unexpected symbol near '"luarocks.path"'
> require "luarocks.path"
> require "luarocks.core.manif"
stdin:1: module 'luarocks.core.manif' not found:
no field package.preload['luarocks.core.manif']
no file './luarocks/core/manif.lua'
no file '/usr/local/share/lua/5.1/luarocks/core/manif.lua'
no file '/usr/local/share/lua/5.1/luarocks/core/manif/init.lua'
no file '/usr/local/lib/lua/5.1/luarocks/core/manif.lua'
no file '/usr/local/lib/lua/5.1/luarocks/core/manif/init.lua'
no file '/usr/share/lua/5.1/luarocks/core/manif.lua'
no file '/usr/share/lua/5.1/luarocks/core/manif/init.lua'
no file './luarocks/core/manif.so'
no file '/usr/local/lib/lua/5.1/luarocks/core/manif.so'
no file '/usr/lib/x86_64-linux-gnu/lua/5.1/luarocks/core/manif.so'
no file '/usr/lib/lua/5.1/luarocks/core/manif.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file './luarocks.so'
no file '/usr/local/lib/lua/5.1/luarocks.so'
no file '/usr/lib/x86_64-linux-gnu/lua/5.1/luarocks.so'
no file '/usr/lib/lua/5.1/luarocks.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
stdin:1: in main chunk
[C]: ?
> require "luarocks.manif_core"
> require("datafile.util")