//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. VsCode中好用的git源代码管理插件GitLens

    1.在插件tab搜索GitLens 2.安装成功后将光标移至代码行即会显示代码编写者 3.在VsCode左侧菜单栏,点击GitLens图标即可查看History,也可以查看全部的日志 4.查看上下pu ...

  2. jdbcUrl is required with driverClassName

    https://blog.csdn.net/newbie_907486852/article/details/81391525 springboot2.0配置多数据源: spring.datasour ...

  3. WPF 的 Application.Current.Dispatcher 中,为什么 Current 可能为 null

    原文:WPF 的 Application.Current.Dispatcher 中,为什么 Current 可能为 null 在 WPF 程序中,可能会存在 Application.Current.D ...

  4. .NET母版页实例(UI页面)

    全文注释: 1.<!DOCTYPE>声明位于文档中的最前的位置,处于<html>标签之前. 2.此标签可告知浏览器文档使用哪种HTML或XHTML规范 3.<!DOCTY ...

  5. Python 3 MySQL数据库操作

    import pymysql class Mysql_db(): def __init__(self,ip,username,password,db_name,table_name): self.ip ...

  6. Part_three:Redis持久化存储

    redis持久化存储 Redis是一种内存型数据库,一旦服务器进程退出,数据库的数据就会丢失,为了解决这个问题,Redis提供了两种持久化的方案,将内存中的数据保存到磁盘中,避免数据的丢失. 1.RD ...

  7. Programming Principles and Practice Using C++ Notes2

    第三章对象.类型和值 对象:用来保存一个指定类型值的一些内存单元. 类型:定义一组可能的值与一组运算(对于一个对象). 值:根据一个类型来解释的内存中的一组比特. #include <iostr ...

  8. 视觉AI风口一触即发,虹软AI沙龙点金深圳

    7月26日,虹软AI沙龙在深圳湾科技生态园空间举办.AI沙龙是基于虹软视觉开放平台的开发者交流沙龙,旨在通过分享最新的实战案例,帮助开发者解决技术及落地难题,让技术更贴近实用场景. 本次活动中,深圳市 ...

  9. SpringBoot+SpringCloud+vue+Element开发项目——搭建开发环境

    1.新建一个项目

  10. 18,flask项目中使用celery

    导包: from celery import Celery from celery.result import AsyncResult app.config['CELERY_BROKER_URL'] ...