您当前的位置: 首页 > 

Mac安装V8和Less

发布时间:2017-02-26 19:52:04 ,浏览量:0

在rails项目里添加了如下3个gem:

gem 'therubyracer' gem 'less-rails' gem 'twitter-bootstrap-rails'

最后一个是css样式表,估计需要less支持,而less又需要javascript运行时去编译LESS文件到css.

原文如下:

Post-install message from twitter-bootstrap-rails:
Important: You may need to add a javascript runtime to your Gemfile in order for bootstrap's LESS files to compile to CSS. **********************************************

ExecJS supports these runtimes:

therubyracer - Google V8 embedded within Ruby

therubyrhino - Mozilla Rhino embedded within JRuby

Node.js

Apple JavaScriptCore - Included with Mac OS X

Microsoft Windows Script Host (JScript) **********************************************

但是安装v8库时老是出错,原来不能安装最新5.x版本的,要安装3.x版本的,所以一步一步来吧:

brew install v8-315 gem install libv8 -v '3.16.14.17' -- --with-system-v8 gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315 bundle install

然后ok了 ;)

关注
打赏
1688896170
查看更多评论

暂无认证

  • 0浏览

    0关注

    107766博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.0737s