therubyracer gem on windows

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.


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.