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++写的,其中的并 ...
随机推荐
- Mysql 的字符编码机制、中文乱码问题及解决方案【转载】
本文转载自:http://hi.baidu.com/huabinyin/item/7f51e462df565c97c4d24929.感谢作者及相关博主. 相信很多朋友都会对字符编码敬而远 ...
- RAM区间最值
RMQ (Range Minimum/Maximum Query)问题是指:对于长度为n的数列A,回答若干询问RMQ(A,i,j)(i,j<=n),返回数列A中下标在i,j里的最小(大)值,也就 ...
- 解决多线程下simpleDateFormat的安全问题
// 日期格式化 private static final ThreadLocal<SimpleDateFormat> GMT_FORMATERS = new ThreadLocal< ...
- swift开发笔记24 解决键盘遮挡输入框 的方法
很简单,就是开始输入时把整个view的frame上移,也就是把y值减小就行了,至于减少多少自己调 ,也可以动态获取参见(http://blog.csdn.net/lengshengren/articl ...
- 使用symbolicatecrash分析crash文件
对于我们iOS开发者来说,最心碎的事莫过于苹果审核一个星期后上架app store,而第二天就报出闪退bug.一周前我刚经历过,而且最坑的是由于第一次做个人开发,经验不足,没有集成友盟的分析SDK,还 ...
- Java基础知识强化94:Calendar类之Calendar概述和获取日历字段的方法
1. Calendar类概述: Calendar 类是一个抽象类,它为特定瞬间与一组诸如 YEAR.MONTH.DAY_OF_MONTH.HOUR 等 日历字段之间的转换提供了一些方法,并 ...
- MySQL(13):Select-order by
1. 按照字段值进行排序: 语法: order by 字段 升序|降序(asc|desc) 允许多字段排序,指的是,先按照第一个字段排序,如果说,不能区分,才使用第二个字段,以此类推. ...
- centos5.5上apache快速安装H264流媒体支持MP4-H264边下边播
2013年的某一天,客户反馈北京同事做的广告视频下载速度好慢,几MB的视频在手机上要下载接近一分钟才能开始播放. 我分析后发现两点:1)托管的服务器没支持流媒体:2)广告视频MP4并非流媒体格式. 对 ...
- MultiWii MWC的软件和调试方法
(如果你的电脑是win7 64位的系统,安装了JAVA虚拟机后GUI仍然运行不了,那你就需要到C:\Program Files\Java\jre7\bin\找到并复制javaw.exe,然后粘贴到C: ...
- FFMPEG 视频旋转设置
fmpeg -i inputfile.mp4 -vf "transpose=1" outputfile.mp4 0=90CounterCLockwise and Vertical ...