FreePascal & OpenShift - openshift

any one has experience with Open Shift and install FreePascal as a cartridge?
I found this but I don't know how make it work :
https://github.com/jhadvig/openshift-pascal-cartridge
I want to know what is the instruction of making FreePascal cartridge.

The following command should install that cartridge for you
rhc app create freepascal https://cartreflect-claytondev.rhcloud.com/reflect?github=jhadvig/openshift-pascal-cartridge
Basically since the manifest.yml file does not contain a Source-Url definition, you need to run it through the cartridge reflector as i did above.
Unfortunately that cartridge also does not seem to install correctly. You should leave an "issue" using the issues tab on that cartridge asking if it is ready for production use or not.
If you want to develop your own cartridge, you can read through the cartridge developers guide here: http://openshift.github.io/documentation/oo_cartridge_developers_guide.html

Related

Error in initiating astro after choosing a framework

I'm trying to initiate astro. When i don't choose a framework i get this error although i have git installed and fully working. Any help will be highly appreciated.
√ Which frameworks would you like to use? »
> Copying project files...
could not find commit hash for latest
This seems to be an issue with degit. Please check if you have 'git' installed on your system, and install it if you don't have (https://git-scm.com).
If you do have 'git' installed, please file a new issue here: https://github.com/withastro/astro/issues
It depends on your OS and environment.
For instance, withastro/astro issue 2144 reports the exact same error message, but on Windows, using Linux on WSL2 (Ubuntu 20.04.3 LTS).
Double-check your %PATH%/$PATH in your execution environment.
Update Oct. 2022, ten month later: withastro/astro issue 2144 is reported closed with the workaround by Matej Bunček:
As I was researching this seems to be a general issue with NPM for those who uses SSH.
There's an open issue here: npm/cli#2610 which is still far from being resolved and it's a huge thread.
Some folks might be interested in these workarounds to get it working.
git config --global url."https://github.com/".insteadOf git#github.com:
git config --global url."https://".insteadOf git://
Also I've tried yarn, npm and pnpm, all of them seems to have same problem so I believe it's core problem of node.
Also both npm 6 and 7 are not working.
Not a direct solution to your error message, but a general solution for those kinds of errors:
I would recommend doing the development inside docker containers, so called devcontainers.
Since you will develop in separate and isolated environments containing only the project's minimum dependencies and tools, it is a lot less likely to face OS specific issues in general.
Here are some resources to get started:
https://code.visualstudio.com/docs/remote/containers
https://microsoft.github.io/code-with-engineering-playbook/developer-experience/devcontainers/
https://github.com/microsoft/vscode-dev-containers

What exactly needs to be included in a RubyMine custom Ruby configuration, esp. for debugging?

I usually use rvm, but also need to work with a custom Ruby build. I understand that when I go to the RubyMine "Settings", "Languages & Frameworks", "Ruby SDK and Gems" dialog, I need to press "+" and select "New Local with Custom Configurator".
On that dialog, the Ruby interpreter path is self explanatory, but I don't know which environment variables I need to specify in the "Custom Configurator" session. What information needs to go there?
I am using RubyMine 2021.1 on both Mac OS and Linux. I need to be able to debug, which means that when RubyMine installs the debug support gems, they need to go to the right location, and be found from that location.
It turned out that all I needed to specify there was my GEM_HOME:
env GEM_HOME=/opt/my-custom-ruby/gems/2.7.0
I was surprised that I didn't also need to explicitly set the path to the directory containing the Ruby interpreter (for commands other than ruby, such as bundle), but I guess RubyMine does that for me. Or, maybe it doesn't, and I just haven't encountered an error yet.
Edit: It turns out I did have an issue with a gem not being found. I added to that env command and the problem went away, but I'm not really sure yet if that was the issue or if adding both GEM_PATH and PATH were necessary. Here is what I wound up with:
env GEM_HOME=/opt/my-custom-ruby/gems/2.7.0 GEM_PATH=/opt/my-custom-ruby/gems/2.7.0 PATH=/opt/my-custom-ruby/bin/ruby:$PATH
EDIT 2021-12-24
I just tried this again on a new installation and the above did not work. I was getting build errors saying that I needed to install the development tools. It turned out that when specifying the path in the
Custom Configurator field I needed to include the path for the gcc compiler. I just put most of the paths in my login PATH value there, and the gem installation succeeded.

How to use packagesbuild with GitHub Actions

One of my Open Source projects uses Packages to build the macOS installer. After GUI-based setup of the pckgproject file, the installer build can be easially invoked from the command line through the packagesbuild command.
I'm now setting up a GitHub Actions based build workflow, running on the GitHub-hosted runners, which should ideally create a ready-to-use installer, so I need to invoke packagesbuild during that process. Unfortunately packagesbuild is not available on the macos-10.15 runner used. I don't see any option to install it during the workflow run, as it's not available through e.g. homebrew but maybe I'm overlooking something. Is there any option I'm overlooking beneath rebuilding my installer and switching to pkgbuild?

How to install Google Apis Drive v3 via command line on Ubuntu-18.04

I have been trying to install Install-Package Google.Apis.Drive.v3 using this source with the difference that I have Ubuntu-18.04 instead of Windows.
I know it may be a simple question but I have been trying research how to do that from this morning. I installed sudo apt install nuget on my machine and have been trying to add packages or as in this case the Google.Apis.Drive.v3 package but no luck.
I went through this source which was useful, but does not carry information I was able to replicate on my Linux machine.
Also this source, this one and this one too. But also this last one is for Windows and was not very useful.
How do I install Google Apis Drive V3 via command line easily as it is documented for windows but on Ubunbtu-18.04?
Thanks for pointing to the right direction for solving this problem.
Solution
The way you install your Drive API's library is depending on the programming language you are aiming to use. These are the following commands to run depending on the different languages to interact with the API (with their respective links to the source of the setup):
Python:
pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
C#/.NET:
Create a new Visual C# Console Application project in Visual Studio.
Open the NuGet Package Manager Console, select the package source nuget.org, and run the following command:
">Install-Package Google.Apis.Drive.v3
Java:
gradle init --type basic
mkdir -p src/main/java src/main/resources
Node.js:
npm install googleapis#39 --save
For the Browser check out the steps to follow here
I hope this has helped you. Let me know if you need anything else or if you did not understood something.
NOTE: For all Ubuntu-18.04 users that wish to install via command line the correct way is: sudo dotnet add package Google.Apis.Drive.v3

How to add monit cartridge to OpenShift?

I'm trying to add the monit cartridge to my OpenShift app using the following syntax:
rhc cartridge add https://github.com/openshift-cartridges/openshift-origin-cartridge-monit/blob/master/metadata/manifest.yml -a <appName> -n <domainName>
Unfortunately I'm always getting:
The cartridge manifest at <linkFromAbove> could not be downloaded: The
cartridge manifest at <linkFromAbove> must be smaller than 20480 bytes.
What's the problem - how can I fix it?
I came across a similar problem now, so I'm leaving the solution here for others who might have the same problem.
If you are adding the cartridge via the webconsole, you need to use the link for the raw file, i.e:
https://raw.githubusercontent.com/openshift-cartridges/openshift-origin-cartridge-monit/master/metadata/manifest.yml
The cartridge has been updated and should now be working, it was trying to download a version that did not exist anymore. It is now downloading the latest version.