How do I deploy webpacker with nvm with capistrano?
Was following your tutorial for capistrano but did not see any webpacker in there :(.
Right now I am having a problem that cap seems to be finding my old node version before I installed nvm and upgraded node.
Tried using capistrano-nvm gem, and getting an error
nvm: v14.2.0 is not installed or not foundnvm: v14.2.0 is not installed or not found
I can find it in cd /root/.nvm/versions/node/v14.2.0/bin.
Should I just scratch nvm and update node the old fashioned way? Kind of don't want to mess anything up on production!
Thanks so much for your amazing tutorials and this really helpful forum.
There's nothing special you need to do for deploying Webpacker with Capistrano as it's built-in to the Rails assets:precompile step. The only thing you need to do is make sure that NodeJS is installed and in your
PATH when deploying.
You don't want to install NVM as the root user. It should be on the deploy user, same as rbenv. Your code always runs and deploys under the
deploy user so you want to avoid
I have been trying to solve this for 5+ hours at this point. M D - did you ever figure out a solution here?