//1.删除原gem源
gem sources --remove https://rubygems.org/ //2.添加国内镜像
gem source -a https://gems.ruby-china.com //3.打印是否替换成功
gem sources -l //4.更换成功后打印如下
*** CURRENT SOURCES ***
https://gems.ruby-china.com
sudo gem install sass
Building native extensions. This could take a while...
ERROR: Error installing sass:
ERROR: Failed to build gem native extension. current directory: /var/lib/gems/2.5./gems/ffi-1.11./ext/ffi_c
/usr/bin/ruby2. -r ./siteconf20190522--9c6o4.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h extconf failed, exit code Gem files will remain installed in /var/lib/gems/2.5./gems/ffi-1.11. for inspection.
Results logged to /var/lib/gems/2.5./extensions/x86_64-linux/2.5./ffi-1.11./gem_make.out

这个烂方法不能用

sudo chmod 777 /Library/Ruby/Gems

sudo chmod go-w /usr/local/bin

来安装一个homebrew

https://docs.brew.sh/Homebrew-on-Linux

sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"

继续按照官方说的做,基本上都是环境的问题。

test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile

安装完毕测试一下

brew install hello

安装了完整版居然好了。。。。好吧

sudo apt-get install ruby-full

如果没好,那就继续

brew install ruby

不知道homebrew的不要问我,因为我也不知道是什么鬼。应该和忍者影分身一种鬼东西。

安装完毕看一下版本号

继续安装sass(我叫他洒洒水)

安装成功,查看一下是否安装成功

landv@Desktop201712556489:~/node$ sass -v
bash: sass: 未找到命令
landv@Desktop201712556489:~/node$

悲惨呀,又是环境问题,明明已经安装成功了

换一条路

npm install -g sass

一样的问题,找不到命令

FUCK~~~~

难道只有Deepin是酱紫~~~

好吧曲线救国,直接吧npm下载到的node-sass加入环境变量

综上所述,那就是卸载ruby再进行安装配置,如果还不行那就再卸载一边。

ERROR:  While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - /Library/Ruby/Gems/2.3./gems/fuzzy_match-2.1./.gitignore

报这个错误就执行

sudo gem install cocoapods-core

然后再安装sass

记住千万不要用deepin自带的ruby

重要的事情不怕多说

sudo apt-get install ruby-full

Linux用流了,要比Windows配置快。

Deepin Linux 绝逼是环境的问题,虽然它不背锅吧。

https://www.cnblogs.com/landv/p/10867433.html(深度Linux /etc/profile 环境变量生效问题)

warning insecure world writable dir ruby mode 040777,gem insstal sass error failed to build gem native extension的更多相关文章

  1. /var/lib/gems/2.5.0/gems/seccomp-tools-1.3.0/lib/seccomp-tools/dumper.rb:125: warning: Insecure world writable dir /home/python/.local in PATH, mode 040777 解决方案

    /var/lib/gems/2.5.0/gems/seccomp-tools-1.3.0/lib/seccomp-tools/dumper.rb:125: warning: Insecure worl ...

  2. Insecure world writable dir /usr/local in PATH, mode 040777

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfi ...

  3. iOS:解决pod的Insecure world writable dir问题

    当我们运行pod setup的命令的时候,有时候会碰到这个警告: /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.33.1/lib/cocoapods/execut ...

  4. Ruby 踩坑 “Failed to build gem native extension”

    ruby新手,总是会出现这样那样的问题,这里先记录下,希望能解决你得问题. 首先是安装ruby 环境,楼主愚钝,在公司和自己的电脑上来来回回整了好几天,每次安装 gem 包的时候总是报错,错误信息大致 ...

  5. ruby中输入命令行编译sass(ruby小白)

    Ruby(或cmd中)输入命令行编译sass步骤如下: (1)举例而言:首先在F盘下建立一个总文件夹,比如test文件夹:其次在该文件夹下建立html,images,js,sass等文件夹. (2)在 ...

  6. ruby配合gem使用sass

    Ruby环境安装 1.Ruby安装包下载地址:http://rubyinstaller.org/downloads/下载对应系统版本的安装包: 2.双击rubyinstaller-2.2.3-x64. ...

  7. 1月10日 ruby基础教程,查漏补缺; 2月22日 Exception补充

    https://ruby-doc.org/core-2.5.0/Exception.html 1月20日练习完1,2章. 第一章 初探 ‘’单引号不执行转义符. \t 制表符.\n 换行符. p me ...

  8. ruby 编译安装,gem国内源ruby.taobao.org

    centos6.6final 一.安装依赖包(使用默认CENTOS更新源): # yum install openssl* openssl-devel zlib-devel gcc gcc-c++ m ...

  9. Ruby基础类型,动态特性,代码块

    #Ruby内置基础数据类型 NilClass,TureClass,FalseClass,Time,Date,String,Range,Struct,Array,Hash #Numerice 1.分为I ...

随机推荐

  1. webapi session

    webapi中使用session 修改global.cs里面的内容 using System; using System.Web; using System.Web.Routing; using Sy ...

  2. oracle 查询 10题

    说明:表数据来自oracle 初始用户之一scott里面的三个初始表:emp,dept,salgrade --1.查询员工表中工资最高的雇员的员工号.员工姓名.工资和部门号. select empno ...

  3. 每周分享五个 PyCharm 使用技巧(四)

    文章首发于 微信公众号:Python编程时光 PyCharm 是大多数 Python 开发者的首选 IDE,每天我们都在上面敲着熟悉的代码,写出一个又一个奇妙的功能. 一个每天都在使用的工具,如果能掌 ...

  4. catch SocketException

    https://stackoverflow.com/questions/32810051/cannot-catch-socketexception/32810079#32810079 https:// ...

  5. ASP.NET 一般处理程序 接收文件上传

    public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain&qu ...

  6. 那些年伴我一起成长的SAP装备

    今天这篇文章无关技术,我们来聊聊SAP装备,即打上了SAP logo的那些物品. 但凡在SAP圈子工作过一段时间的从业者们,手上或多或少都拥有一些此类装备.Jerry当然也不例外,这些装备无论物品本身 ...

  7. oracle批量操作

    https://stackoverflow.com/questions/39576/best-way-to-do-multi-row-insert-in-oracle 1 批量insert 方式一: ...

  8. 程序写入mycat中文乱码解决(也包括mysql编码修改)

    乱码问题可能出现的三个地方 1.程序连接的编码要设置 jdbc:mysql://192.168.1.1:8066/TESTDB?useUnicode=true&characterEncodin ...

  9. my.cnf参数说明

    MySQL 5.7数据库参数优化 连接相关参数 max_connections:允许客户端并发连接的最大数量,默认值是151,一般将该参数设置为500-2000 max_connect_errors: ...

  10. IAR为STM32创建工程模板(基于STM32f103zet6)

    今天给小伙伴分享一篇给stm32新建工程模版 1.首先打开IAR,就是这个样子 2.再建一个目录文件夹 3.建立一个工作空间,以及建好工作空间如右图所示 4.接下来建立工程,Project------ ...