No, there is no way that I know of to currently install this gem on Windows. The problem is that there is currently no pre-compiled version of the libv8 gem for Windows, and the source version is only compatible with *nix. It does not necessarily have to be that way, it just requires somebody taking the time to make the compile work for Windows. https://github.com/cowboyd/libv8

That said, Windows should come with a JScript, the Microsoft JavaScript runtime, which Rails (via execjs) will automatically detect and use, so you should be able to just remove your dependency on therubyracer.

As the maintainer of that gem, this would of course make me sad, but it should get you on your way.


This is essentially what Nik has done, I believe:

In your Gemfile isolate the TheRubyRacer gem to the production environment like this:

group :production do
  gem 'therubyracer-heroku', :platform => :ruby
end

In your development environment, instead of a plain bundle install do

bundle install --without production

or, as Nik suggests, bundle install development. When you deploy to Heroku it will install the gem because it is the production environment.

Rails gurus: please suggest edits to make this less sucky.


The reason for all of these problems is the therubyracer-0.11.0beta1-x86-mingw32.gem and the v8.dll.

I have complied the necessary dlls and gem files and upload them to github.

download the package and follow the instructions.

https://github.com/eakmotion/therubyracer_for_windows


There is build for windows. It can be manually downloaded and installed by gem install therubyracer-0.11.0beta1-x86-mingw32.gem.


To answer part of your question about Rails 3.1, here's the deal...

Rails 3.1 currently uses a gem that requires a javascript runtime to be installed on the machine. On Mac you typically don't have to worry about this since it already has one, but Linux (and I think Windows too) you need to install one. So, therubyracer, or sometimes node or nodejs, are sometimes installed since they provide that.

However, one of the main Rails guys said they plan to fix that dependency before the final Rails 3.1 release, so hopefully that'll happen and the dependency will be gone.