Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing ruby gem less-rails on windows machine using therubyracer

since a while I am trying to install the less-rails gem on my windows7 machine.

I already managed to install the needed therubyracer.gem using this binary file: https://github.com/stereobooster/therubyracer/downloads

I also downloaded the v8.dll and put in my ruby/bin directory. So far everything works well, the bundle install is running and the server starting without any problems.

But as soon as I request a page using a less file I get the following error message

undefined method `in_javascript?' for #"<"V8::Error: [object Object]>

My css.file is alomst empty

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

The custom.css.less looks like this

@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

I am using the rails installer with ruby 1.9.3.

There are not many problem description like this. All I found was solved by updating to at least ruby 1.9.2. But that unfortunately is not the solution for me. Does somebody have an idea?

Thanks

like image 826
mickmackk Avatar asked Jan 30 '26 16:01

mickmackk


1 Answers

  1. Download this file: https://github.com/hiranpeiris/therubyracer_for_windows/archive/master.zip
  2. Extract it to a folder and cd to that folder.
  3. Install the gem file in that folder by gem install therubyracer*
  4. The folder has 2 dll files. Copy them to your ruby/bin folder.
  5. Add this to your Gemfile: `gem 'therubyracer'
  6. bundle install

Have fun.

like image 168
Zuhaib Ali Avatar answered Feb 02 '26 09:02

Zuhaib Ali



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!