ruby-on-rails – rails资产:预编译在系统中未检测到Yarn可执行文件

我正在使用基于Ubunt 17.04的Linux 18.
当我运行rails资产时:预编译我得到以下消息在系统中未检测到Yarn可执行文件

当我按照此PostWebpage中的安装说明进行操作时,我成功安装了Yarn,但是rails一直给我错误

我注意到node.js有适用于Linux Mint的系统软件包,最高版本为17.2,我尝试为Yarn页面执行所有指令并手动安装已安装在我的系统中的node.js.

该消息并不能解释问题.如果我运行纱线 – 帮助它工作,我的纱线 – 转换是0.22

这是我的Linux Mint系统

disTRIB_ID=LinuxMint
disTRIB_RELEASE=18
disTRIB_CODENAME=Sarah
disTRIB_DESCRIPTION="Linux Mint 18 Sarah"
NAME="Ubuntu"
VERSION="16.04 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial
cat: /etc/upstream-release: Is a directory

更新

这是我的echo $PATH在终端/opt/yarn-0.22/bin中的输出,但是当我去那条路径时,没有文件夹/opt/yarn-0.22所以我需要了解它的安装位置和配置正确的PATH SETUP

Path Setup

If you chose manual installation, the following steps will add Yarn to path variable and run it from anywhere.

Note: your profile may be in your .profile, .bash_profile, .bashrc, .zshrc, etc.

Add this to your profile: export PATH="$PATH:/opt/yarn-[version]/bin" (the path may vary depending on where you extracted Yarn to)
In the terminal, log in and log out for the changes to take effect
To have access to Yarn’s executables globally, you will need to set up the PATH environment variable in your terminal. To do this, add export PATH="$PATH:`yarn global bin`" to your profile.

非常感谢
最好的祝福
Fabrizio Bertoglio

解决方法:

yarn是节点包管理器yarn

你必须安装它在这里instrauction installation guide
 如果你有节点和npm你可以安装它
 通过

npm install yarn -g

If you dont have npm in your machine go to 07002 and install node which will also install npm

If you want to manage multiple version node like RVM then you need to checkout 07003

相关文章

ubuntu退出redis的示例:指定配置文件方式启动源码redis:roo...
ubuntu中mysql改密码忘了的解决方法:1.在终端中切换到root权...
ubuntu安装mysql失败的解决方法原因:可能是原有的MySQL还有...
使用centos和ubuntu建站的区别有以下几点1.CentOS是Linux发行...
ubuntu图形界面和字符界面切换的方法:可以通过快捷键CTRL+A...
ubuntu中重启mysql失败的解决方法1.首先,在ubuntu命令行中,...