Additional Steps for RailsInstaller in Windows 8

[UPDATE: You no longer need to do most of the steps below in recent versions of NodeJS. RailsInstaller/RubyInstaller should work just by installing NodeJS.]

If you’ve tried using RailsInstaller or RailsFTW in Windows 8, you might think it works out of the box — that is, until you open a page that uses the asset pipeline and get a cryptic message related to your CSS/JS.

The reason for this is that the built-in JScript runtime is incompatible with Rails. You need to install Node.js and make it the primary runtime for Rails to work.

The easiest way to do this is:

  1. Install Node.js
  2. Run Node.js » “Node.js command prompt”
  3. Get the path of node.exe via “path” command. You’ll get something like:
    C:\Users\bry>path
    PATH=C:\Users\bry\AppData\Roaming\npm;C:\Program Files\nodejs\;C:\Program Files...

    Get the “C:\Users\bry\AppData\Roaming\npm;C:\Program Files\nodejs\;” part.

    Tip: right click command prompt window » Poperties » tick QuickEdit Mode so you can select and right click to copy to clipboard.

  4. Edit the setup_environment.bat for RailsInstaller (e.g. C:\RailsInstaller\Ruby2.0.0\setup_environment.bat, Notepad will do), find the following line
    SET PATH=%RUBY_DIR%\bin;%RUBY_DIR%\lib\ruby\gems\1.9.1\bin;%ROOT_DIR%\DevKit\bin;%PATH%

    for RailsFTW this will be setrbvars.bat (e.g. C:\RailsFTW200402\bin\setrbvars.bat) and the line will be:

    SET PATH=%RUBY_BIN%;%PATH%

    and add the Node.js path after the SET PATH= e.g for RailsInstaller:

    SET PATH=C:\Users\bry\AppData\Roaming\npm;C:\Program Files\nodejs\;%RUBY_DIR%\bin;%RUBY_DIR%\lib\ruby\gems\1.9.1\bin;%ROOT_DIR%\DevKit\bin;%PATH%

    for RailsFTW:

    SET PATH=C:\Users\bry\AppData\Roaming\npm;C:\Program Files\nodejs\;%RUBY_BIN%;%PATH%
  5. At this point, RailsInstaller » “Command Prompt with Ruby and Rails” and RailsFTW » “Start Command Prompt with Ruby” will now have Node.js as the runtime.

September Meetup Videos and RailsFTW 0.11

Just a couple of quick Ruby related updates.

Last Thursday we held our September meetup at the Friendster office in Ayala. Here are the videos of the event:

More pictures are posted at the Facebook group.

Rails FTW

In other news, I got around to updating RailsFTW to Rails 3.2.8, putting the installer ahead of RailsInstaller by a bunch of mini-releases. (LOL)

Updated installer can be found on the RailsFTW site.

RailsFTW, now twice as fast!

Rails FTW

My Game Jam post is waaay overdue but some stuff happened this week (impromptu upgrade, server migration) so I’ll only get around to post about it probably later today.

Anyway, this post is just about the new version up over at RailsFTW. This experimental build is based on TCS’s patched Ruby build which boasted a ~200% increase in performance.

See it for yourself:

RailsFTW v0.10 released, now with Ruby 1.9.3 and Rails 3.2

Rails FTW

Still hung-over from Global Game Jam 2012 (mini-write-up later) when I went to the RailsInstaller site on a whim.

Noticed that it still isn’t using Rails 3.2. So I decided to update my own to be ahead again.

Hopefully this would be the last RailsFTW version (hoping Luis would be able to convince Wayne to include MySQL to RailsInstaller so I won’t need to this anymore LOL).

RailsFTW v0.9 released, now with Rails 3.1

Rails FTW

Thanks to a Battlefield 3 Beta losing streak that I blame on my sucky internet connection, I’ve decided to update my hack-job of a standalone Windows installer for Rails.

Now there are two separate installers, a Ruby 1.8.7 + Rails 3.0.10 installer and a Ruby 1.9.2 + Rails 3.1.0. Here’s a table to give a quick comparison between these two installers with RailsInstaller thrown into the mix:

  RailsInstaller 2 RailsFTW (Rails 3.1) RailsFTW (Rails 3.0)
Ruby version 1.9.2-p290 1.8.7-p352
Rails version 3.1.0 3.0.10
File Size ~55MB ~20MB ~10MB
DB Adapter Gems sqlite3, pg, tiny_tds (MS SQL Server) sqlite3, mysql2
Additional Features git, DevKit
Internet Connection Required? Yes No (Bundler will fail to connect to server but new apps will still work) No
Compiled by Some of the biggest names in the Ruby community Some random third world developer. LOL