3

Is there a way of installing therubyracer gem i.e required to run a RoR project in windows?

I've tried normal way, but it wouldn't and then i tried installing cygwin and then tried installing gem, but still no luck,

Anyone successful in installing this in windows? I can even try the hard methods also (if there're any possible solutions)

cypronmaya
  • 520
  • 1
  • 11
  • 24
  • Did you try google? http://stackoverflow.com/questions/6356450/therubyracer-gem-on-windows – deefour Aug 29 '12 at 15:56
  • yes, of course, as i can see the answers dated back 1year, so i thought it would be a good idea to check, and even in there they said it can be installed in *nix environments, so tried cygwin but no luck. – cypronmaya Aug 29 '12 at 15:59

2 Answers2

3

I used therubyracer_for_windows. It works for me.

Sam Backus
  • 1,693
  • 14
  • 19
  • this worked for me -- windows 7, RailsInstaller. I had also tried adding `:platform => :ruby` [so](http://stackoverflow.com/a/6796100) and, trying to resolve libv8 issues, `gem install libv8 -v '3.16.14.7' -- --with-system-v8` [so](http://stackoverflow.com/a/18648054) – petemyron Oct 03 '14 at 18:36
0

If you need a JS runtime for asset compilation (and other tasks), on Windows it's perfectly safe to simply omit the gem in your Gemfile.

Windows already has a JS runtime, and as far as I am aware, Rails makes use of it when it detects it.

Have a look at the description here, I think you will find it informative.

https://github.com/sstephenson/execjs

dimitarvp
  • 2,316
  • 2
  • 20
  • 29
  • Reason i need is to have twitter-bootstrap gem , and I don't want it to be static, so if there's a hard way please do tell. It keeps on asking me for rubyracer for .LESS files. – cypronmaya Aug 31 '12 at 17:14
  • I can tell you that for a rather simple project I did recently in Rails, the requirement was that a junior developer inheriting the project must be able to code it under Windows. To do that, I commented out `therubyracer` gem and had to specify a concrete version for another gem, like this: `gem "eventmachine", "1.0.0.rc.4"`. That was good enough for the asset pipeline to start working. On your topic though: did you implement the recommendations in twitter-bootstrap-rails gem documentation on using it with and without LESS? – dimitarvp Aug 31 '12 at 17:22
  • What changes should i make it to http://pastebin.com/4WWKwafN , so that my LESS files work in windows, I can't change anything other than Gemfile (it's a project requirement). Thanks for your time – cypronmaya Sep 02 '12 at 07:42
  • Let's start here -- are you still receiving an error with this Gemfile and if so, can you paste it? – dimitarvp Sep 02 '12 at 17:04
  • yes, ofcourse, as you see gem 'twitter-bootstrap-rails' has dependency of rubyracer, I can't install it. – cypronmaya Sep 03 '12 at 18:08