Ensure Node.js Installation and Version Management During Deployment #140
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Description: Ensure Node.js Installation and Version Management During Deployment
Summary
This PR introduces changes to the deployment process to ensure that the required Node.js version (
20.19.1) is installed and used during deployment. It also ensures thatnvm(Node Version Manager) is installed if not already available on the server. These changes are critical for running the Rails application, which depends on specific Node.js functionality.Key Changes
Ensure
nvmis Installednvmis installed on the server.nvmis not found, it is installed using the official installation script fromnvm-sh.Ensure Node.js Version
20.19.1is Installednvmand ensure that Node.js version20.19.1is installed.nvm.Integration with Deployment Process
ensure_node_versiontask is executed before the:updatedstep in the deployment process to guarantee that the correct Node.js version is available before proceeding with the Rails app setup.Why This Change is Necessary
nvmand Node.js simplifies the deployment process and reduces manual intervention.Testing
nvmif it is not already present.20.19.1is installed and used during deployment.Next Steps
nvmand Node.js are correctly installed and used.