-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is nvm-exec.sh actually executed? #10
Comments
So the only two commands that are run under nvm by default are node and npm. To run your check_node task, you want to add
For my own rails + ember-cli deploy, I've had to add I also want to remove the automatic validate check as it actually prevents being able to install nvm through capistrano. |
I think @kayakyakr answer does answer the question? |
This didn't work in my case. I'm also using capistrano-rbenv. The wrapper expects to be passed a command, rbenv makes it a bit more complicated:
|
@lucaspiller I've just landed in the same boat. Any chance you managed to get around it? I should add that I've been able to manually get around it by changing the order of things. In my case this works:
Just need to figure out how to get that to work with Capistrano :-) |
@krsyoung What I'm using is: Rails 4, Capistrano 3.x, Node.js v6 Capfile: require 'capistrano/setup'
require 'capistrano/deploy'
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git
# Mind the order - nvm comes first, before rbenv
require 'capistrano/nvm'
require 'capistrano/npm'
require 'capistrano/rbenv'
require 'capistrano/bundler'
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
require 'capistrano3/unicorn'
require 'capistrano/delayed-job'
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r } deploy.rb: lock '3.10.0'
(...)
set :linked_dirs, %w{bin log node_modules tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
(...)
set :rbenv_type, :user
set :rbenv_ruby, File.read('.ruby-version').strip
set :rbenv_prefix, -> { "RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:nvm_prefix)} #{fetch(:rbenv_path)}/bin/rbenv exec" }
set :rbenv_map_bins, %w{rake gem bundle ruby rails}
set :rbenv_roles, :all # default value
set :nvm_type, :user # or :system, depends on your nvm setup
set :nvm_node, File.read('.nvmrc').strip
set :nvm_map_bins, %w{node npm}
set :nvm_roles, :web
set :npm_roles, :web Also, I do not have any default version of Node.js set in nvm. |
Thanks @fastman, need to dust off some code and will give it a try. 👍 |
Hello folks,
got a weird behavior today:
as you can see
/tmp/pufffer/nvm-exec.sh
actually wasn't executed, and I can't find command to do that anywhere incapistrano-nvm/lib/capistrano/tasks/nvm.cap
Line 28 in f7f37da
Deploy on staging failing as well:
Is it a bug or I'm missing something?
The text was updated successfully, but these errors were encountered: