Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/61.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 安装纱线时出错_Ruby On Rails_Node.js_Npm_Yarnpkg - Fatal编程技术网

Ruby on rails 安装纱线时出错

Ruby on rails 安装纱线时出错,ruby-on-rails,node.js,npm,yarnpkg,Ruby On Rails,Node.js,Npm,Yarnpkg,我正在尝试在新机器上安装Thread,进入brew install Thread后,我的命令行显示: touch: /usr/local/Homebrew/.git/FETCH_HEAD: Permission denied touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew- apache/.git/FETCH_HEAD: Permission denied touch: /usr/local/Homebrew/Library/T

我正在尝试在新机器上安装Thread,进入brew install Thread后,我的命令行显示:

touch: /usr/local/Homebrew/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-
apache/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-
core/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-
dupes/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-
php/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-
versions/.git/FETCH_HEAD: Permission denied
fatal: Unable to create '/usr/local/Homebrew/.git/index.lock': 
Permission denied
error: could not lock config file .git/config: Permission denied
==> Installing dependencies for yarn: icu4c, node
==> Installing yarn dependency: icu4c
==> Downloading https://homebrew.bintray.com/bottles/icu4c-
60.1.high_sierra.bottle.t######################################################################## 100.0%
==> Pouring icu4c-60.1.high_sierra.bottle.tar.gz
Error: Permission denied @ unlink_internal - /usr/local/opt/icu4c

提前谢谢

在以下配置中安装webpack时,我遇到了以下问题

Ubuntu 14.04

webpacker 3.0.2

轨道5.1.4

Ruby 2.3.1p112

我发现了以下错误:

Webpacker要求Node.js>=6.0.0,您正在使用0.10.25 升级Node.js

我已通过以下步骤解决了问题:

在rails应用程序中通过网页包安装Vuejs的步骤

gemwebpacker解决了很多关于如何将前端集成到Rails应用程序的问题

网页包先决条件:Ruby 2.2+、Rails 4.2+、Node.js 6.0.0+和Thread 0.25.2+

注意:-以下步骤适用于ubuntu 14.04用户

步骤1:安装Nodejs

更新源 sudo-apt-get-install-nodejs 步骤2:安装纱线

curl-sS | sudo apt键添加- echo deb stable main | sudo T恤/etc/apt/sources.list.d/warn.list

sudo易于安装纱线

步骤3:将网页包gem添加到rails应用程序中

gem'webpacker',“~>3.0” 然后捆绑安装

步骤4:在rails应用程序中安装Vue

rails网页包:安装:vue 安装vuejs包的方法

例如:

npm安装vue带

现在您在rails应用程序中安装了vue strap

按照以下步骤检查rails应用程序中是否添加了软件包:

cd/您的项目名称/节点模块


似乎自制目录中的权限设置不正确。 您可以这样做:

sudo chown-R$whoami/usr/local

使用npm安装纱线:

酿制纱线

npm安装纱线-g

纱线全球升级纱线