使用therubyracer在Windows机器上安装ruby gem less-rails

我有一段时间试图在我的windows7机器上安装less-rails gem。

我已经设法使用这个二进制文件安装所需的therubyracer.gem: https : //github.com/stereobooster/therubyracer/downloads

我还下载了v8.dll并放入我的ruby / bin目录。 到目前为止一切运行良好,捆绑安装正在运行,服务器启动没有任何问题。

但是,只要我使用较少的文件请求页面,我就会收到以下错误消息

未定义的方法`in_javascript?’ for#“

我的css.file是空的

/* *= require 'custom_less/custom' *= require 'jquery-ui-1.8.24.custom' */ 

custom.css.less看起来像这样

 @import "twitter/bootstrap/reset"; @import "twitter/bootstrap/variables"; @import "custom_less/variables"; // Your own variable overrides. @import "twitter/bootstrap/mixins"; @import "custom_less/mixins"; // Your own mixin. @import "twitter/bootstrap/scaffolding"; @import "twitter/bootstrap/grid"; @import "twitter/bootstrap/layouts"; //import of further bootstrap components //but nothing else 

我正在使用带有ruby 1.9.3的rails安装程序。

这样的问题描述不多。 我发现的所有内容都是通过更新至至少ruby 1.9.2来解决的。 但不幸的是,这不是我的解决方案。 有人有想法吗?

谢谢

  1. 下载此文件: https : //github.com/hiranpeiris/therubyracer_for_windows/archive/master.zip
  2. 将其解压缩到一个文件夹并cd到该文件夹​​。
  3. 通过gem install therubyracer*将gem文件安装在该文件夹中gem install therubyracer*
  4. 该文件夹有2个dll文件。 将它们复制到ruby / bin文件夹。
  5. 将它添加到您的Gemfile:`gem’therubyracer’
  6. bundle install

玩得开心。

经过大量的研究和反复试验后,目前看来,Windows平台上没有更少的工作。

所以我的解决方案是使用bootstrap-sass-rails gem。 这很好用。

Interesting Posts