Open SimonFearby opened 8 years ago
Could you give me a complete bug report please? What steps did you follow to reach this point? Have you installed libbson, libmongoc, and mongorover?
I have the same issues as well. I believe there suppose to be a lua file call 'mongo_module' but the actual mongo_module.lua file is missing.
@kwesijc: mongo_module created by compiling a .so from the c layer. Are you building anything whatsoever? Does coronalabs sdk have access to a luarocks build system? Give us some steps to help us reproduce your issue, and I'll try and help you out!
Hi Chris,
Thanks you for your response. Answer to your questions below.
Are you building anything whatsoever?
Does coronalabs sdk have access to a luarocks build system?
To answer your question coronalabs does not have access to a luarocks build system. One of the responses from the Corona Forums... "Corona uses it's own localized instance of Lua (this is the part where I'm making assumptions, so feel free to correct me @CoronaLabs). You can run the simulator and create builds without installing lua on your development machine, so installing modules via luarocks is not possible." link below to the full discussion on this. https://forums.coronalabs.com/topic/63043-luarocks-corona-sdk/
Somebody on the forum was trying to find a solution to this. https://forums.coronalabs.com/topic/64718-luarocks-coronasdk-attempt/
Give us some steps to help us reproduce your issue
Then I use some the the examples code like below but changing some of the data to connect to my mongo database.
mongorover = require("mongorover") local MongoClient = require("mongorover.MongoClient") local client = MongoClient.new("mongodb://localhost:27017/") local exampleDatabase = client:getDatabase("exampleDB") local exampleCollection = exampleDatabase:getCollection("exampleCollection")
I was expecting an error to come up. This is my error.
Just a little background behind me using the Mongorover project. There are other developers who uses Corona SDK and other SDKs that uses Lua for its language of choice. Some of these developers are trying to find a lua based solution to connect there applications to Mongodb. I came across this solution and found it to be very ideal and simple to use. As for lua rocks it is great. But I was trying to get to it work for my mobile development.
My question to you is. Is it possible or a way in which your Mongo+Lua solution can be module that is not luarocks depended? Also this particular module can consist the drivers necessary where any Lua developer can download and use with their respective Lua development environment like Corona SDK or any other platform that uses Lua?
Any help, resources or pointing us to any solution will be very appreciative. I really love what you did with the mongorover project. Great job. Thank you in advance.
Is it possible or a way in which your Mongo+Lua solution can be module that is not luarocks depended?
yes, we used to use CMake to compile mongorover c files, but deprecated it in favor of the LuaRocks build system.
Are you building anything whatsoever?
I apologize if this came across harsh, I was trying to reference if you were attempting to use CMake (a.k.a. a "build" system). I'm happy to help if I can :).
@kwesijc + @SimonFearby: Do either of you have a Corona Enterprise license? Only then can you have native code capabilities. I unfortunately don't have one and wouldn't be able to actually try it out. If so, they do have some documentation for using native code and we can potentially attempt that together. I'll look more into compiling a static library for iOS, as mentioned in the docs.
Hi Chris,
Thank you for your response. I am not knowledgable about CMake and how it really works. If you were to use CMake would that make the Mongorover module dependent on its own? In order words, would anyone be able to download the folder containing the files and start using it to connect to MongoDB using their own SDK or Lua based platform? Or would we still need dependency on CMake as we do with LuaRocks?
Do either of you have a Corona Enterprise license?
Hey @SimonFearby @kwesijc. Sorry for the delays (I didn't get notified when @kwesijc edited the post above). I have another build system (CMake) up that we might be able to get things on Corona working. Before I move forward with this, can you confirm there still interest in making this happen?
Hi Chris,
Thank you so much for your reply. Yes, we are still interest in making this happen. I have two questions. Would this solution be independent or flexible to where it contains all the code and resources needed to run this with Corona? Or would we need CMake on our end when developing to make this work with Corona?
In other words, when we compile our apps and publish them would the Mongorover code and resources get compiled into the app package as well and be able to run on user's individual devices?
Again, thank you so much for your time.
You should just be able to add the plugin without any worries. All the compiling is the plugin developer's work (from what I can tell). Let me do some more reading and let me reach out to Corona and get more information before I give you false information.
Do you have a platform that you are looking to start out with?
Hi Chris,
I will be working with Corona SDK and Defold SDK defold.com. They are both Lua based platforms. Defold has an option where you can add stand alone Lua module as well. But I will double check on that.
However, the one I will be started out with is Corona SDK. I have a trial of the Enterprise version. Corona labs granted me a limited trial version for the purposes of this. If you would like access to it please let me know. My email is kwesijc@gmail.com. I would share the credentials for the free trial version through my email.
I got a corona license for plugin developers (I get two months free). I'll give it a shot (and will update as progress hopefully goes along). I'll try and make this happen, can't promise anything though :).
Hi Chris,
Sounds good. Thank you so much for your time and effort your putting into this.
Hi Chris,
Hope all is well. Just checking in on the Corona plugin. How is the progress? Does the plugin look doable?
I haven't made any substantial progress, I'll keep you up to date. I'm hoping to dedicate some time to it this week.
Hi all. I feel really embarrassed leaving you both hanging. I hit some hard obstacles and didn't continue on. I was told to contact someone on the forums that goes by the handle StarCrunch for guidance, and I just did. I'm going to do that and see if there's a transition we can do to have this on Corona SDK. mongorover is kind of weird because it has a C component and a lua component (hybrid components for Android are only Java for Corona's docs) among other things. I'll see if Corona can extend my license as well to see if this can work and we can communicate more closely over email if you'd like. I'd love some help as well if you think you're up for the task.
I was hoping this could work on lua for ARM app development using the http://www.coronalabs.com SDK but the following module is missing.
module 'mongo_module' not found: no field package.preload['mongo_module']