I am trying to configure response_on_rails for an existing rails 5.0 application according to the following instructions: https://github.com/shakacode/react_on_rails
- gem "react_on_rails", "8.0.0"
- rails create action_on_rails: install
I get the following error:
ERROR: yarn is required. Please install it before continuing. https://yarnpkg.com/en/docs/install
now this is my yarn, npm and node path:
[ user@server ]$ which node /usr/bin/node [ user@server ]$ which npm /usr/bin/npm [ user@server ]$ which yarn ~/.yarn/bin/yarn
How can I ensure its use of appropriate yarn and help set react_on_rails?
EDIT: This is my ~ / .bashrc file:
export PATH="$HOME/.rbenv/bin:$PATH" eval "$(rbenv init -)" export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
This is the my / bin / yarn file in my application:
#!/usr/bin/env ruby VENDOR_PATH = File.expand_path('..', __dir__) Dir.chdir(VENDOR_PATH) do begin exec "yarnpkg #{ARGV.join(" ")}" rescue Errno::ENOENT $stderr.puts "Yarn executable was not detected in the system." $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" exit 1 end end
source share