Closed fffx closed 3 years ago
Rails expect node to be an executable file, but before nvm initialization node is a bash function
node
https://github.com/rails/execjs/blob/master/lib/execjs/external_runtime.rb#L132
commands.find { |cmd| if File.executable? cmd cmd else path = ENV['PATH'].split(File::PATH_SEPARATOR).find { |p| full_path = File.join(p, cmd) File.executable?(full_path) && File.file?(full_path) } path && File.expand_path(cmd, path) end }
Sorry, I should read the full documentation, add NVM_LAZY_LOAD_EXTRA_COMMANDS=('rails') works.
NVM_LAZY_LOAD_EXTRA_COMMANDS=('rails')
Rails expect
node
to be an executable file, but before nvm initializationnode
is a bash functionhttps://github.com/rails/execjs/blob/master/lib/execjs/external_runtime.rb#L132