grunt serve Warning: Running "sass:server" (sass) task
使用grunt serve运行时遇到一问题:
y@y:ydkt$ grunt serve
Running "serve" task Running "clean:server" (clean) task
Cleaning .tmp...OK Running "env:all" (env) task Running "injector:sass" (injector) task
Missing option `template`, using `dest` as template instead
Injecting scss files ( files)
>> Nothing changed Running "concurrent:server" (concurrent) task
Warning: Running "sass:server" (sass) task
Warning:
You need to have Ruby and Sass installed and in your PATH for this task to work.
More info: https://github.com/gruntjs/grunt-contrib-sass
Use --force to continue. Aborted due to warnings. Execution Time (-- :: UTC)
loading tasks 209ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ %
sass:server 8ms ▇▇ %
Total 218ms Use --force to continue. Aborted due to warnings. Execution Time (-- :: UTC)
loading tasks 114ms ▇▇▇▇▇▇▇▇▇▇ %
serve 22ms ▇▇ %
clean:server 92ms ▇▇▇▇▇▇▇▇ %
injector:sass 94ms ▇▇▇▇▇▇▇▇ %
concurrent:server 602ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ %
Total 934ms
问题是:提示我Ruby 与Sass未进行安装配置:
Warning: Running "sass:server" (sass) task
Warning:
You need to have Ruby and Sass installed and in your PATH for this task to work.
More info: https://github.com/gruntjs/grunt-contrib-sass
Use --force to continue.
我 ruby -v 查看了以下ruby 版本为1.9.1 ubuntu已经进行预装了,查看了以下需要安装compass才可以编译sass.
下面进行安装compass:
y@y:ydkt$ sudo gem install compass
Fetching: sass-3.4..gem (%)
Fetching: multi_json-1.11..gem (%)
Fetching: compass-core-1.0..gem (%)
Fetching: compass-import-once-1.0..gem (%)
Fetching: chunky_png-1.3..gem (%)
Fetching: rb-fsevent-0.9..gem (%)
Fetching: ffi-1.9..gem (%)
Building native extensions. This could take a while...
ERROR: Error installing compass:
ERROR: Failed to build gem native extension. /usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9./rubygems/custom_require.rb::in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9./rubygems/custom_require.rb::in `require'
from extconf.rb::in `<main>' Gem files will remain installed in /var/lib/gems/1.9./gems/ffi-1.9. for inspection.
Results logged to /var/lib/gems/1.9./gems/ffi-1.9./ext/ffi_c/gem_make.out
提示我ruby 版本过低,
Gem files will remain installed in /var/lib/gems/1.9.1/gems/ffi-1.9.8 for inspection
下一步要更新我的ruby 版本,安装2.1.2
sudo apt-get -y update
sudo apt-get install cmake sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev
libncurses5-dev libffi-dev curl git-core openssh-server redis-server postfix checkinstall libxml2-dev
libxslt-dev libcurl4-openssl-dev libicu-dev mysql-client libmysqlclient-dev libreadline6-dev curl --progress http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz | tar xz
cd ruby-2.1.
./configure
make
sudo make install
安装成功:
y@y:~$ ruby -v
ruby 2.1.2p95 (-- revision ) [x86_64-linux]
y@y:~$
再次重新安装compass:
y@y:ydkt$ sudo gem install compass
[sudo] password for y:
Fetching: sass-3.4..gem (%)
Successfully installed sass-3.4.
Fetching: multi_json-1.11..gem (%)
Successfully installed multi_json-1.11.
Fetching: compass-core-1.0..gem (%)
Successfully installed compass-core-1.0.
Fetching: compass-import-once-1.0..gem (%)
Successfully installed compass-import-once-1.0.
Fetching: chunky_png-1.3..gem (%)
Successfully installed chunky_png-1.3.
Fetching: rb-fsevent-0.9..gem (%)
Successfully installed rb-fsevent-0.9.
Fetching: ffi-1.9..gem (%)
Building native extensions. This could take a while...
Successfully installed ffi-1.9.
Fetching: rb-inotify-0.9..gem (%)
Successfully installed rb-inotify-0.9.
Fetching: compass-1.0..gem (%)
Compass is charityware. If you love it, please donate on our behalf at http://umdf.org/compass Thanks!
Successfully installed compass-1.0.
Parsing documentation for chunky_png-1.3.
Installing ri documentation for chunky_png-1.3.
Parsing documentation for compass-1.0.
Installing ri documentation for compass-1.0.
Parsing documentation for compass-core-1.0.
Installing ri documentation for compass-core-1.0.
Parsing documentation for compass-import-once-1.0.
Installing ri documentation for compass-import-once-1.0.
Parsing documentation for ffi-1.9.
Installing ri documentation for ffi-1.9.
Parsing documentation for multi_json-1.11.
Installing ri documentation for multi_json-1.11.
Parsing documentation for rb-fsevent-0.9.
Installing ri documentation for rb-fsevent-0.9.
Parsing documentation for rb-inotify-0.9.
Installing ri documentation for rb-inotify-0.9.
Parsing documentation for sass-3.4.
Installing ri documentation for sass-3.4.
Done installing documentation for chunky_png, compass, compass-core, compass-import-once, ffi, multi_json, rb-fsevent, rb-inotify, sass after seconds
gems installed
此时执行grunt serve,之前的错误已经没有了,但是又出现了新的错误:
Running "open:server" (open) task
Warning: Command failed: /bin/sh -c /home/y/my_git/ydkt/node_modules/open/vendor/xdg-open "http://localhost:9000"
/bin/sh: : /home/y/my_git/ydkt/node_modules/open/vendor/xdg-open: Permission denied
Use --force to continue. Aborted due to warnings.
提示:拒绝访问!修改文件权限:
y@y:open$ cd vendor/
y@y:vendor$ chmod xdg-open
y@y:vendor$ ll
总用量
drwxrwxr-x y y 5月 : ./
drwxrwxr-x y y 5月 : ../
-rwxrwxrwx y y 5月 : xdg-open*
y@y:vendor$
最后执行grunt serve成功!!!
grunt serve Warning: Running "sass:server" (sass) task的更多相关文章
- yeoman运行grunt serve 提示错误
今天在使用 yeoman 的时候,当我运行 grunt serve 命令的时候,出现如下提示: 1.Error: Cannot find module 'load-grunt-tasks' $ gru ...
- Sass实战 sass官网
Sass实战 sass官网 1.相关视频教程:http://pan.baidu.com/s/1eSl8bUa 1.1我的项目源码:http://pan.baidu.com/s/1dFmqbyp 1.2 ...
- php-fpm: 某项目网站频繁出现503问题解决( WARNING: [pool www] server reached pm.max_children setting (50), consider raising it)
服务是nginx+php-fpm配置, 在运行过一段时间后,会经常出现: WARNING: [pool www] server reached pm.max_children setting (50) ...
- SASS - 使用Sass程序
SASS – 简介 SASS – 环境搭建 SASS – 使用Sass程序 SASS – 语法 SASS – 变量 SASS- 局部文件(Partial) SASS – 混合(Mixin) SASS ...
- angular项目grunt serve报错Cannot find where you keep your Bower packages
运行angular项目grunt serve一直报错,截图如下: 无法找到报错Bower包的位置. 解决方法: 1.全局安装bower npm install bower -g 2.检查是否安装成功 ...
- grunt入门讲解4:如何创建task(任务)
每当运行Grunt时, 你可以为其指定一个或多个任务, 这些任务用于告诉Grunt你想要它做什么事情. 如果你没有指定一个任务,并且你已经定义一个名为 "default" 的任务, ...
- SASS教程sass超详细教程
SASS安装及使用(sass教程.详细教程) 采用SASS开发CSS,可以提高开发效率. SASS建立在Ruby的基础之上,所以得先安装Ruby. Ruby的安装: 安装 rubyinstaller- ...
- vue+sass 下sass不能运行问题
好久没写博文了,今天抽空写一写,最近在用vue.js build 项目,今早想使用sass来编译css,可是安装好依赖包之后仍然显示一下错误: ERROR in ENOENT: no such fil ...
- Darwin Streaming server 的 Task 类
Darwin Streaming Server 是一个开放源代码的streaming server,对于streaming server的编程和软件结构有着一定的参考价值,它是使用C++写的,其中的并 ...
随机推荐
- 《算法实战策略》-chaper19-队列、栈和双端队列
对于计算机专业的学生来说,他们一定会很熟悉一句话:程序设计 = 算法 + 数据结构.而根据笔者的理解,所谓程序设计其实就是为了编程解决实际问题,所谓算法是一种解决问题某种思维的方法,但是思维需要得到编 ...
- puppet常用调试命令
yum快速部署puppet测试环境(C/S端) rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm yum r ...
- N - Marriage Match II - HDU 3081(最大流)
题目大意:有一些男孩和女孩玩一个游戏,每个女孩都可以挑一个男孩来进行这个游戏(所有人都要参加),女孩只会挑选她喜欢的男孩,并且她们认为她们朋友喜欢的男孩她们也是喜欢的(朋友的男朋友也是我的男朋友??? ...
- python模块之bsddb: bdb高性能嵌入式数据库 1.基础知识
转自:http://blog.csdn.net/zhaoweikid/article/details/1665741 bsddb模块是用来操作bdb的模块,bdb是著名的Berkeley DB,它的性 ...
- SVN和Maven及Jenkins(转)
目前项目组在开发一个项目,由多个子模块构成,构建工具是maven,版本控制工具是svn.本文想对如何结合使用maven和svn提出一点初步的想法 一.只有svn的情况 首先考虑没有maven的情况.这 ...
- 错误 是否保存对以下各项的更改 devenv.sin
描述: 打开VS2012项目时,提示 是否保存对以下各项的更改 devenv.sin google了一下,没找到...纠结.百度了一下,竟然有的...擦一直以为google很给力,看来对于中文的解析不 ...
- win7 vs2010 安装cocos2d-x
http://blog.csdn.net/leoncoder/article/details/12523727 新安装搭建cocos2d-X的跳过这里,看以下红色開始: cocos2d-x删除vs20 ...
- ClickOnce发布后不能安装
当在internet发布用ClickOnce打包的客户端程序时,遇到ClickOnce启动后出错,错误信息如下: + Downloading https://xxxxx/Deploy/pc/Boote ...
- css ie hack整理
网上有很多关于ie hack的文章,可能由于文章发布后ie的版本还在升级.所以导致有些hack写法已经不适用了.以下是本人整理的ie6-11的一些hack常用写法.(以下默认文档模式为标准模式) 1. ...
- PHP输出中文乱码的问题(转)
用echo输出的中文显示成乱码, 其实应该是各种服务器脚本都会遇到这个问题, 根本还是编码问题, 一般来说出于编码兼容考虑大多的页面都将页面字符集定义为utf-8 <meta http-equi ...