Searchkick parallel reindexing using "mode: :async" returns argument error - searchkick

Looking into parallel reindexing to improve performance, but when I run MyModel.reindex(mode: :async) in a console, as suggested in the docs (https://github.com/ankane/searchkick#parallel-reindexing), I get:
ArgumentError: unknown keyword: :mode
Ruby (3.1.2)
Gem versions:
Searchkick (4.6.3)
Elasticsearch (7.13.3)
Rails (6.1.6)

Searchkick v4.6.3 doesn't has the support for mode: :async option.
You might need to upgrade the searchkick version to at least v5.0.1, to use this option.
For full change log, please refer here.

Related

I get this error running PMD from salesforce CLI, "ERROR running scanner:run: Attempted to resolve unregistered dependency token: "RuleManager""

Can anyone help me with this. Im using Mac. I cant find the location of the rulemanager. Please see error below
Lxxxxxxx:pmd-bin-6.34.0 xxxxxx$ sfdx scanner:run pmd --target /usr/src --category rulesets/java/quickstart.xml -f sarif
(node:17810) [editions-autoloader-none-broadened] Error Plugin: sfdx-cli: editions-autoloader-none-broadened: Unable to determine a suitable edition, even after broadening.
module: #oclif/config#1.17.0
task: runHook init
plugin: sfdx-cli
root: /Users/xxxxxxx/.local/share/sfdx/client/7.100.0-9d243d8
See more details with DEBUG=*
(Use node --trace-warnings ... to show where the warning was created)
ERROR running scanner:run: Attempted to resolve unregistered dependency token: "RuleManager"
Kieran, this is an issue that we just discovered. It is related to an incompatibility with the version of Node.js that is bundled with the Salesforce CLI and a library that is used by sfdx-scanner.
A temporary workaround can be found at https://github.com/forcedotcom/sfdx-scanner/issues/412
You will need to use the npm installation instead of the pkg installer since you are interested in the Sarif output. Sarif output was added in version 2.6.0. The issue affects versions 2.6.0-2.8.0 when using the pkg installer on a Mac.
We hope to have a fix rolled out in the next couple of days. I will post here when version 2.9 has been released. Sorry for any inconvenience.
Kieran, this issue has been fixed in version 2.9.1. You can upgrade by executing the following commands in your shell.
sfdx plugins:uninstall #salesforce/sfdx-scanner
sfdx plugins:install #salesforce/sfdx-scanner

Attempted to load interface "CommandSubscriber" from namespace "MongoDB\Driver\Monitoring"

I have Symfony 5 project and just following the instructions to install the DoctrineMongoDBBundle package, and I'm receiving te following error,
Attempted to load interface "CommandSubscriber" from namespace "MongoDB\Driver\Monitoring".
Did you forget a "use" statement for another namespace?
/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/APM/CommandLoggerInterface.php (line 9)
I have the following versions of mongodb and doctrine running.
doctrine/mongodb-odm-bundle": 4.1
mongodb/mongodb": 1.6
Also the php driver installed through Pecl (Version 1.7.4)
Anyone got any ideas to what I'm missing?
If it helps anyone in the future, whilst the MongoDB Driver was installed, I needed to restart PHP FPM, that fixed it.

How can I specify the container runtime to use in docker-compose version 3?

I'm working on a container that requires the nvidia runtime. I can specify this runtime in a v2.3 docker-compose file like so:
version: "2.3"
services:
my-service:
image: "my-image"
runtime: "nvidia"
...
Running docker-compose up my-service works just fine. I get the nvidia runtime and everything works fine.
I've tried this just by changing the "2.3" to "3" and I get the following error when I do docker-compose up my-service:
ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services.my-service: 'runtime'
If I take out the runtime: "nvidia" line, this comes up without problems—except of course it's not using nvidia and I need access to the GPU on the host to get the performance I want.
Is there an equivalent for runtime in docker-compose v3? If not, why was this option dropped? Thanks in advance. :)
I realize this question is rather old but I ran into it yesterday.
TL;DR :
Upgrade you docker-compose to 1.27.0+
Details
There has been quite a discussion about the removal of the runtime keyword in the dedicated Docker bug thread : https://github.com/docker/compose/issues/6691
Finally, in the 1.27.0, Docker has decided to allow it back. So you just need to have the correct version of docker-compose.
I would recommend the pip install path as their versions are more up to date (current docker-compose version in Debian buster is 1.21).
And it seems there are other good reasons to do so, see here.

Using Scons to build mongo-nonx86 on an arm based Synology NAS

I have a Synology DS212j NAS (cpu Feroceon 88FR131 rev 1 (v5l)) with the optware ipkg installed. I am trying to build mongo-nonx86 on it.
"scons all" gives me the following messages:
scons: Reading SConscript files ...
scons version: 2.0.1
python version: 2 5 6 'final' 0
Checking whether the C++ compiler worksyes
Checking for C library stdc++... no
can't find stdc++ library which is needed
I have the stdc++ library installed, I also have ssl installed. My underlying question is how can I get scons to tell me more about what is really missing, where it is looking, how it is looking etc. I have so far found no options which generate any more useful diagnostic output?
Obviously a ready-made solution for getting mongodb working on this great little box would be even more welcome :-)
Well even if you do have it installed, it doesn't seem to think so, here is what I would try to do, install libssl-dev, then try to install the dev package for libstdc++, which is: libstdc++-dev.
Then see if you can compile it.

How to get Sinatra on stage with XP?

Keen to try Sinatra but I’m using Windows XP and getting error:
“C:/Ruby19/lib/ruby/gems/1.9.1/gems/rack-1.3.5/lib/rack/backports/uri/common_192.rb:53:in `remove_const’: constant URI::WFKV_ not defined (NameError)”
There is a reference to the problem at: https://github.com/rack/rack/pull/247
where Shanev removed the fix but how do I do that??
The problem seems to with ruby 1.9.1 update your ruby version and then check.
Ref:here