Friday, August 1, 2008

Installing and using Juggernaut on Windows

NOTE: After I wrote this post, I came across an article which seems pretty useful. Please refer to it for installing Juggernaut on Windows. It is different from the post below mainly in that it tells you to use json_pure instead of json. Here is the link: http://wiki.mintworx.com/index.php/How_to_Setup_juggernaut_on_windows

  1. Juggernaut requires Rails version of 2.0.2. I haven't tried with any lower version, so I've no idea if there might be some problems using it there.
  2. Start out: gem install eventmachine
  3. Then: gem install juggernaut --include-dependencies. Adding include-dependencies will try to install json along with juggernaut. The version of json available for Windows at the time of writing this is 1.1.1. Juggernaut gem has a requirement that the version of json must be >= 1.1.2. So installing the gem along with dependencies does not go through as this requirement puts a spanner in the works. Instead, use this: gem install --ignore-dependencies, which should go through fine. Before/after this, install json on your own.
  4. While installing json (gem install json) it asks you the version you want to install. Select 1.1.1 (ms-win32).
  5. Install plugin: ruby script/plugin install http://juggernaut.rubyforge.org/svn/trunk/juggernaut
  6. So by now, eventmachine, json, juggernaut gem and juggernaut plugin are installed.
  7. Time to configure the gem. Typing juggernaut -g juggernaut.yml to configure the gem fails with the error about your json version not being >= 1.1.2. To get past this, edit this file (thanks Google desktop!) ...\ruby\lib\ruby\gems\1.8\specifications\juggernaut-0.5.4.gemspec and try configuring again.
    s.add_dependency(%q eventmachine, [">= 0.10.0"])
    s.add_dependency(%q json, [">= 1.1.2"]) # ---- changed this to 1.1.1
    s.add_dependency(%q hoe, [">= 1.5.1"]) #--- changed this to 1.3.1
  8. Then start juggernaut. juggernaut -c juggernaut.yml
  9. Look at Juggernaut README and cool RoR chat with Juggernaut for tips and code examples.

1 comments:

Anonymous said...

great tips, working well.