代码之家  ›  专栏  ›  技术社区  ›  fabOnReact

rails资产:系统中未检测到预编译可执行文件

  •  7
  • fabOnReact  · 技术社区  · 8 年前

    我正在使用基于Ubunt 17.04的Linux 18。 rails assets:precompile 我收到以下消息 Yarn executable was not detected in the system

    Post Webpage ,我成功安装了Yarn,但rails不断给我错误

    我注意到 node.js Linux Mint的系统包达到版本 17.2 ,我试着为 Yarn node.js 它已经安装在我的系统中。

    这个消息并不能真正解释这个问题。如果我跑步 yarn --help yarn --version 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
    

    使现代化

    这是我的回声输出 $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.
    

    谢谢 顺致敬意, 法布里齐奥·贝托格利奥

    1 回复  |  直到 8 年前
        1
  •  21
  •   uzaif    7 年前

    纱线是节点包管理器 yarn

    installation guide 如果你有node和npm,你可以安装它 通过

    npm install yarn -g


    如果你没有 npm 在您的机器中转到 this link node 也将安装 npm公司


    RVM 然后你需要结账 this link