Closed ssimeonov closed 11 years ago
This had a bug fix about a month ago here on Github. CRAN is still not updated to the version found here.
What's the best way to load the package from GitHub?
There is a 'ZIP' button on the project page. This will download the complete archive to you which must then be built with Visual Studio
On Tue, Dec 18, 2012 at 3:03 AM, Simeon Simeonov notifications@github.comwrote:
What's the best way to load the package from GitHub?
— Reply to this email directly or view it on GitHubhttps://github.com/gerald-lindsly/rmongodb/issues/11#issuecomment-11477117.
I'm on Mac OS X--no Visual Studio. :( Perhaps installing from source using devtools
?
Alas, devtools
can't do it.
> install_github(repo='rmongodb', username='gerald-lindsly')
Installing github repo(s) rmongodb/master from gerald-lindsly
Installing rmongodb.zip from https://api.github.com/repos/gerald-lindsly/rmongodb/zipball/master
Error: Does not appear to be an R package
Well, whatever you would use to build. I know nothing about Macs. There is probably a build error under OS X. Was planning to address this in the next major release (which will be a while still). I don't know what they're doing to get the library on CRAN for Mac OS X.
On Tue, Dec 18, 2012 at 3:08 AM, Simeon Simeonov notifications@github.comwrote:
I'm on Mac OS X--no Visual Studio. :( Perhaps installing from source using devtools?
— Reply to this email directly or view it on GitHubhttps://github.com/gerald-lindsly/rmongodb/issues/11#issuecomment-11477219.
oops, use R's package install as described in the ReadMe.md (but I think the build problem will get in your way)
On Tue, Dec 18, 2012 at 3:11 AM, Gerald Lindsly gerald.lindsly@gmail.comwrote:
Well, whatever you would use to build. I know nothing about Macs. There is probably a build error under OS X. Was planning to address this in the next major release (which will be a while still). I don't know what they're doing to get the library on CRAN for Mac OS X.
On Tue, Dec 18, 2012 at 3:08 AM, Simeon Simeonov <notifications@github.com
wrote:
I'm on Mac OS X--no Visual Studio. :( Perhaps installing from source using devtools?
— Reply to this email directly or view it on GitHubhttps://github.com/gerald-lindsly/rmongodb/issues/11#issuecomment-11477219.
Yes, you are right: I got a build error.
2087[SPX/r(ss_mongo_rep *)]$ r CMD INSTALL ~/Downloads/rmongodb-master/rmongodb.tar.gz
* installing to library ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library’
* installing *source* package ‘rmongodb’ ...
** libs
*** arch - i386
make: *** No rule to make target `._api.o', needed by `rmongodb.so'. Stop.
ERROR: compilation failed for package ‘rmongodb’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/rmongodb’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/rmongodb’
Turned to SO for help http://stackoverflow.com/questions/13929128/r-package-build-failure-on-mac-os-x
Where did you get rmongodb.tar.gz? If you downloaded from GitHub, this would not be in the right format to install directly. You'll need to unpack it and the install should be done from under the rmongodb/ directory (as unpacked from the archive).
rmongodb.tar.gz
contains the master branch of this repo.
This GitHub archive is not itself an R package. The R package is contained within the subfolder 'rmongodb'. The instructions in the ReadMe.md should be used, but I am pretty sure there is still going to be build errors under OS X.
On Tue, Dec 18, 2012 at 9:00 PM, Simeon Simeonov notifications@github.comwrote:
rmongodb.tar.gz came from the master branch of this repo.
Right, my previous comment was incorrect: the .tar.gz
file contains the rmongodb
subfolder with DESCRIPTION
etc.
The build command you used was on the GitHub archive, it looked like to me. Unpack the archive and switch current directories to its root before issuing 'R CMD INSTALL rmongodb'
On Wed, Dec 19, 2012 at 2:56 AM, Simeon Simeonov notifications@github.comwrote:
Right, my previous comment was incorrect: the .tar.gz file contains the rmongodb subfolder with DESCRIPTION etc.
Also, you'll need to unpack mongo-c-driver.zip to rmongodb/rmongodb/src as described in the ReadMe.md also.
Tried what recommended on https://github.com/gerald-lindsly/rmongodb/blob/master/README.md. unpack mongo-c-driver-src.zip into rmongodb/rmongodb/src, then recheck and reintall the rmongodb, still got this error:
Hi,
sorry for the previous problem. Seems I unzip the wrong rmongodb package. My installation is for Windows i386.
Today I install R on my windows i386 machine, then unzip the rmongodb windows package from "http://cran.r-project.org/web/packages/rmongodb/index.html".
I check the rmongodb install successfully:
library("rmongodb") rmongodb package (mongo-r-driver) loaded Use 'help("mongo")' to get started.
But when I tried to run the command in teachers_aid.R, code: indexed = list(indexed=TRUE) b <- mongo.find.one(mongo, admin, indexed) if (is.null(b)) { mongo.index.create(mongo, classes, "name") mongo.index.create(mongo, students, "name") mongo.index.create(mongo, class_students, "class_id") mongo.index.create(mongo, class_students, "student_id") mongo.index.create(mongo, tests, "class_id") mongo.index.create(mongo, tests, "name") mongo.index.create(mongo, test_scores, "test_id") mongo.index.create(mongo, test_scores, "student_id") mongo.insert(mongo, admin, indexed) }
The error promted:
At this time, there is already a database created in MongoDB:
Could you please help? Is this problem the teacher_aid.R coding problem or something wrong with my installation?
Great thanks! Feifei
Feifei, you are seeing the same bug this issue is about and which was fixed about a month ago. CRAN is not updated yet. Get the source code from GitHub: (shortcut to it here): http://github.com/gerald-lindsly/rmongodb/archive/master.zip
Hi Gerald, thanks for your reply. Is this the Package for Windows i386? After unpacking mongo-c-driver.zip to rmongodb-master/rmongodb/src, I tried to run command: "R CMD build rmongodb". Got this error:
Install also failed:
Pls help. Actually, I tried this package yesterday, always those errors occured. So this morning, I tried the CRAN zip package for windows. That package doesn't need to be install. All I needed to do was just copying that folder to R's library directory.
Best Regards Feifei
This looks like incompatibilities with a more recent version of R. It may help if you posted the relevant portion of rmongodb.Rcheck/00install.out. I am working on an update, but there are problems between the current mongo-c-driver and rmongodb. I am working with 10gen, Inc. to resolve these issues.
rmongodb is updated to mongo-c-driver 0.7. Hopefully, this will resolve these issues. OS X still needs to be tested.
P.S. It may take a day or two to get distributed on the CRAN network
I just tested on OSX (10.7.5). It builds clean and unit tests pass.
-Dan
On Sun, Dec 23, 2012 at 1:54 PM, Gerald Lindsly notifications@github.comwrote:
rmongodb is updated to mongo-c-driver 0.7. Hopefully, this will resolve these issues. OS X still needs to be tested.
— Reply to this email directly or view it on GitHubhttps://github.com/gerald-lindsly/rmongodb/issues/11#issuecomment-11649262.
contents of 00install.out:
Hi Gerald, I tried the updated package this morning, seems the same problem is still exist. 00install.out msg was the same.
Is there any step error when install rmongodb? Should I build the downloaded 'ZIP' file with Visual Studio(as you mentioned in your past comment for 'ssimeonov'), not the "R CMD build rmongodb" command?
Maybe I will wait for your next release of rmongodb in CRAN. The CRAN's rmongodb_1.0.3.zip works on my Windows but had error.
Thanks Feifei
Feifei, I have a feeling you don't have Rtools installed. See http://cran.r-project.org/doc/manuals/R-admin.html#The-Windows-toolset
Thanks!!! Gerald, you are right. I uninstalled the Rtool last week. Now the rmongodb works well.
Merry Christmas~~
Ok, great. The issues reported by the topic of this issue have been resolved then.
Merry Christmas to you too.
Using the latest (v1.0.2)
[rmongodb](https://github.com/gerald-lindsly/rmongodb)
driver for MongoDB, the following code crashes the R session. I am using the 64-bit R version 2.15.2 on Mac OS X.The output is:
In this case the problem is the invalid collection name. However, passing a valid collection name does not solve the problem:
Passing non-empty criteria also does not solve the problem:
Switching to
find
makes the issue go away at the expense of extra code.The same problem happens if a fake command is passed. This used to work under R 2.15.1 (it was part of my test suite).