title: Unable to require in Lua
body: <p>My understanding of require is as follows:
  If the file you are requiring is either in the same directory that you are requiring from, or is in <code>package.path</code>, you will be able to require it.</p>
  <p>For me however, I get a <code>Module not found!</code> error, even when the files are in the same directory.</p>
  <p>As for <code>package.path</code>, the directories listed do not exist on my PC. Here is my <code>package.path</code>:</p>
  <p>/usr/local/share/lua/5.2/?.lua;/usr/local/share/lua/5.2/?/init.lua;/usr/local/lib/lua/5.2/?.lua;/usr/local/lib/lua/5.2/?/init.lua;/usr/share/lua/5.2/?.lua;/usr/share/lua/5.2/?/init.lua;./?.lua</p>
  <p>There are no folders named 'lua' on my PC (that I can find) other than ones created by me for different purposes. This leads me to suspect a bad install, although I did try to uninstall Lua and got <code>Virtual packages like 'lua' can't be removed</code>. This could be relevant, I'm not sure. But other than the inability to require modules and the lack of directories named 'lua', everything works fine.</p>
  <p>At this point I'm not sure what to do. I can't find much information on the subject other than &quot;append to your <code>package.path</code>!&quot; but I would rather be able to simply have the two aforementioned files in the same directory for this to work.</p>
  <p>How can I fix this?</p>
  <p>I also have small question: Are there default modules/packages that come with lua?</p>
  <p>Edit:<br />
  OS - Ubuntu Linux<br />
  Lua version - 5.2<br />
  I am running <code>foo = require('bar')</code><br />
  I am not trying to require a binary module, I am trying to require a lua file that I have written.</p>