How to build and install rails application dependencies on different hosts - ruby-on-rails

I have a rails 3 application that I'd like to deploy. My deployment environment does not have build tools installed and cannot then install dependencies with native extensions.
I have a build host configured with build tools that can build the native extensions.
How can I deploy the native extensions from my build host ?
I have tried doing bundle package on the build host and bundle install --local on the remote host. It correctly installs gems without native extensions but it still tries to build native extensions on the production host.

It is bad practice to build on your production servers.
When I deploy Django or Rails I always build a toolchain for whatever the OS package management system doesn't cover. I then develop and deploy with that toolchain. This assures everyone uses the same versions of the tools.
To create the toolchain you need to install the packages and supporting executables in that directory. You also need to make sure that they are relocatable.
For example I currently use Django on RedHat. RedHat doesn't use the latest version of python, and many of the python libs I use rev more often than the repository maintainers pick them up. As a result there are often no RPMs for the latest software. I create a toolchain directory, compiled python on all the libs I needed into that directory. I then bundle it up into an RPM for deployment.
toolchain/
bin/
python
...
lib/
python2.7/
...
site-packages/
...
include/
...

I've ended up to a custom deploy.rb. Hoping I will be able to relase it as a gem that extends Capistrano (still not totally happy with it though)

Related

How do I create instance of V8JSEngine on MacOS without Kernal 32? React.net SSR

I'm using sever side rendered react front end on a .net core MVC webapp.
I just switched over to IOS. When I tried debugging my project. I received the following errors:
DllNotFoundException: Unable to load shared library 'kernel32' or one
of its dependencies JsEngineLoadException: Failed to create instance
of the V8JsEngine. See the original error message: “Unable to load
shared library 'kernel32' or one of its dependencies.
Bassed on This issue, It seems like IOS doesn't have the package that the react script is looking for.
Is there an easy way to have V8JsEngine be less OS dependent, or set a development config for V8 to have it talk to the correct OS package?
React.Sample.Webpack.CoreMvc#1.0.0 build
webpack 4.43.0
node v16.19.0
npm 8.19.3
node v8 9.4.146.26-node.24
I tried running brew install v8.
It apparently installed v8--11.0.226.13.arm64_ventura.bottle.tar.gz, but I'm not sure how to check which version of v8 the SSR webpack is using.

I am having a problem while packaging my electron app using the electron-builder?

This error window appears as soon as I enter my app after packaging it using the electron-builder
although the devDependencies for electron-updater is included
electron-builder does not include devDependencies in the packaged application since they're exclusive for development, you should reinstall electron-updater as a dependency.
From the electron-builder website:
A complete solution to package and build a ready for distribution Electron app for macOS, Windows and Linux with “auto update” support out of the box.
NPM packages management:
Native application dependencies compilation (including Yarn support).
Development dependencies are never included. You don’t need to ignore them explicitly.
...

Installing Dart Editor in Debian

How to exactly install dart editor in debian? Tried to build dart from the source on this site Building Dart on Debian up to the gclient runhooks and ran
$ cd dart
$ ./tools/build.py -m release -a x64
which they say will build ALL (including the dart editor w/c I prefer). But unluckily, the build fails after waiting a thousand years. Any ideas on how to properly install ALL the dart components on debian?
I tried a while ago and failed building Dartium on Debian.
It might make sense to build the Dart runtime you use for the production server yourself but IMHO building DartEditor and Dartium is not worth the effort on Debian.
To install the development environment I just download the Linux package and unpack it.

Grunt packages needs to be installed for every release branch of a project

We are using grunt for build automations. We have installed 5-6 corresponding packages for the project. We are using TFS as our source control management tool. Every time a branch is taken out for the release we have to install all the packages including grunt again and again. Windows 7 is our OS.
Is there any way to install grunt and related packages globally in Windows so that we don't have to do it again and again ?
Not sure if it would be related but we are using .NET for our development.

Error installing passenger on OSX: Curl development headers with SSL support not found

I am getting "Curl development headers with SSL support" error when trying to install passenger nginx module on OSX machine.
I downloaded curl-7.19.7 from Apple and it installed fine.
What's going on??
The default Apple installation includes the binaries, but not the development headers. When you build the package from source (even from Apple's open source packages) it includes the headers, so you can build the native extensions. Therefore, when you manually install Apple's nginx packages, you get everything you need to build the extension. Kinda like what happens when you try to install the mysql gem on OS X Server if you haven't installed Apple's MySQL source packages. b0rked until you build from Apple's (modified) source.

Resources