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++写的,其中的并 ...
随机推荐
- pdf打印乱码问题
问题: 使用Adobe Reader将一份pdf文件通过我的虚拟打印机输出后(输出的是中间文件,等同于EMF文件),查看的时候发现有时候是乱码.最简单的必现步骤: 1.使用Adobe Reader打开 ...
- [Design Pattern] Adapter Pattern 简单案例
Adapter Pattern, 即适配器模式,用于连接两个不兼容的接口,属于结构类的设计模式. 或者叫做,转换器模式. 下面是一个转换器模式简单案例. 假设已有 AudioPlayer 专门播放 m ...
- 关于在SLES11, RHEL6, OEL6 and UEK2 Kernels使用hugepages的告警
ALERT: Disable Transparent HugePages on SLES11, RHEL6, OEL6 and UEK2 Kernels (Doc ID 1557478.1) Modi ...
- 使用Jekyll搭建免费的Github Pages个人博客
一.Git 1.Git概述 Git is a free and open source distributed version control system designed to handle ev ...
- BootStrap--Tables(表格) MVC中不刷新做增,删,改(C#)
自带的Tables会有自动分页,搜索等一些动能,很方便,唯一的不足就是添加,修改,删除数据需要刷新页面,并不能静态. 下面说的是如何不刷新页面(Ajax)去执行增,删,改操作. 需要用到的样式,JS库 ...
- [转] boost::any的用法、优点和缺点以及源代码分析
boost::any用法示例: #include <iostream> #include <list> #include <boost/any.hpp> typed ...
- Linux下查看显示器输出状态以及修改显示器工作模式(复制 or 扩展)
//关闭显示器VGA1xrandr --output VGA1 --off //开启显示器VGA1xrandr --output VGA1 --auto //关闭显示器LVDS1xrandr --ou ...
- IPython notebook 使用介绍
参考资料: http://mindonmind.github.io/2013/02/08/ipython-notebook-interactive-computing-new-era/ http:// ...
- ViewPage 一次滑动多页
效果 size是3的倍数时 其他情况下 初始化 private List<HonerUserBean> anchorList; private ViewPager vp ...
- SQL 去除小数点后无效 0 的方法
select convert(float,10.0000) 就是这么简单