bundle only selected libraries in packrat - r

I am trying to move a project from local machine to a server with no internet access and no privilege to install libraries.
The server is already installed with many of the libraries.
For my current project the are some libraries and dependencies which are not available on server.
So, I am trying to use packrat to bundle and move the project to server.
Now, the bundle size is becoming huge and others. I want to bundle only packages that are not available on server. How can I do this?

Create a project with all your libraries and work, load packrat library and call function bundle()
library(packrat)
bundle()
This create a projname.tar.gz file
Copy this file and paste on your server project folder and call unbundle function as follows, bundle = name of your bundle and "." means unbundle here in that folder
library(packrat)
unbundle(bundle="packlib.tar.gz",where=".")

Related

Issue in deployment of cord app

I checked https://docs.corda.net/deploying-a-node.html for deploying in windows server. I can see deploying nodes using NSSM Manager.
When I deploy nodes, how it will access my application which is placed as a jar under /opt/corda /CordaApp.jar
Also, When I run nssm.bat file under each nodes, my cmd is going on running with the first cmd and not stopping. Nothing proceed after that.
There is a typo in the docs. Where it says:
Create a directory called plugins in /opt/corda and save your CorDapp jar file to it. Alternatively, download one of our sample CorDapps to the plugins directory
It should read instead:
Create a directory called plugins in C:\Corda\ and save your CorDapp jar file to it. Alternatively, download one of our sample CorDapps to the plugins directory
This was fixed by the following PR: https://github.com/corda/corda/pull/2607.

How to Disable download missing package each time in meteor?

I tried to create meteor web application, but meteor download missing package each time when I change my code, and it was unnecessary.
So, can I config it only runs at the first time?
Thanks!
Could you add the actual message on the package it tries to download? Anyway, there are two potential locations where meteor looks for packages that need to be installed.
This is which each Meteor application and it's using Meteor Atmosphere packages. You can find these at .meteor folder in your project root file called packages path ./meteor/packages
Other potential place is packages.json in project root. It exists if you have used npm install or meteor npm install within the project.
Deleting unnecessary packages from these files should do the trick.

ignore dev dependencies in php composer

I have developed a composer laravel based project that I need to install on a remote production server. The problem is I have limited permission/ access so my option is to "archive" the package( using composer archive) and unpack on the production.
What folders do I need to archive and how can I ignore the dev dependencies of the package as well as vendor dev dependencies?
composer archive is likely not to help you, because this command creates an archive of a defined version of a package.
You probably want to upload the whole working application, and not only one package. You should create a little script that will create the archive file for you, which should do:
checkout the application from the repository in a new directory
run composer install --no-dev to install all required dependencies without dev-dependencies
optionally delete files that are not necessary on the server, like documentation, the .git folder, and other stuff
create the archive file from all these files
optionally upload that archive to the target server and unarchive there
optionally check basic functions and switch to the new uploaded version on the server

Remove conflicting dependencies when reinstalling with IzPack

I have a grails application and an installer for it. Everything is working with no problem. But, I recently updated the version of the HttpClient. The problem happens when a customer installs the new version of the application (without uninstalling the older version). The IzPack just copies all the files, replacing the ones with the same name. So, it creates conflicts with the older version of HttpClient (4.0.1) and the newer version (4.2). To be more specific, there are httpclient-xxx-4.2.jar files and httpclient-xxx-4.2.jar files. The application stops working because of this conflict.
I'd like to know if there's any way to remove the jar files of the lib directory BEFORE the IzPack copies the new ones.
I followed this article about running a script file after the installation: http://maksim.sorokin.dk/it/2010/06/14/installation-with-izpack-launching-bat-files/
So, I configured the IzPack to extract the jar files in a templib directory and created a script to delete the jar files of lib and move the new jars from templib to lib.

Py2app does not include the Sqlite driver- "Database error: Driver not loaded Driver not loaded"

I am having the same issue described in this post on the py2app mailing list.
I have a python application that uses a sqlite database. On my machine, which has all the dependencies installed, there are no issues. However, when I bundle the application with py2app, clicking a menu that causes the database to be accessed results in this error:
Database error: Driver not loaded Driver not loaded
For the Windows installer, the files in \Qt\version\plugins\sqldrivers\*.* can be copied to \myApp\sqldrivers\*
The same files on the Mac can be found in /opt/local/share/qt4/plugins/sqldrivers (installed via Macports).
However, copying the sqldrivers directory to my application's Resources or Frameworks directories still results in the same error.
How can I add sqlite support into my application that is built using py2app?
Turns out the pyside recipe does have a way to specify which qt-plugins you need...
options=dict(py2app={
'argv_emulation': True,
'qt_plugins' : "sqldrivers",
}
),
This puts all the sqldrivers into the right directory and setups qt.conf correctly.
have you tried what he said
in this post ?
py2app setup.py usage question
it mentioned
you need to include the sqlalchemy.dialects.sqlite as a package
I managed to get this to work as follows:
After building with py2app, inside the application's Contents directory, make a new plugins directory.
Then copy sqldrivers/libqsqlite.dylib into this plugins directory.
Afterwards, install_name_tool has to be used to change the library links in libqsqlite.dylib to point to the Qt libraries in the application's Frameworks directory rather than the system Qt libraries.

Resources