-
Notifications
You must be signed in to change notification settings - Fork 240
Installation
The standard way to install on most platforms is to just install the jsduck gem:
$ gem install jsduck
If you encounter errors during gem installation, you may need to install the header files for compiling extension modules for Ruby 1.9. For Debian systems you'll need the ruby1.9-dev
package. For Red Hat / CentOS / Fedora use the ruby-devel
package.
You need a C/C++ compiler in your system to compile some of the JSDuck dependencies. The simplest route is to install the Xcode command line tools from App store (you don't need the full Xcode, just command line tools will suffice). Or you could try installing GCC instead.
The Ruby 1.8 that comes with OS X can work fine, however some users have reported problems with it and have found a solution in upgrading to Ruby 1.9 using RVM.
For Windows users out there, there are two main options.
- Download the single exe file with everything bundled together (simple).
- Install Ruby and then the JSDuck gem (read forward, but be brave).
To install JSDuck through gem, you first need Ruby.
Grab the latest Ruby installer from rubyinstaller.org. Run it and make sure Ruby executable gets added to your PATH
.
You also need to install the Development Kit to be able to build native extensions - download it from the same site, then follow the installation instructions (be careful when using the self-extracting exe - if you don't give it a new directory name, it will unpack all files to the current directory, which you probably don't want).
To be able to install JSDuck you need some additional tweaks. Go and download therubyracer gem and v8 lib that stereobooster has built for windows. You need to manually install this special rubyracer version instead of the one from rubygems as the latter simply won't work on Windows. To install:
> gem install therubyracer-0.11.0beta1-x86-mingw32.gem
To make it actually work you need v8.dll
somewhere in your
system. Extract the lib_v8.3.11.9.zip
take the v8.dll
inside it
and place into the bin
directory of your Ruby installation (other
dirs that are on your PATH can work too, but I've found this to be the
most sensible place to put it).
Similarly the latest rdiscount fails to build on Windows. Install an older version manually:
> gem install rdiscount -v 1.6.8
Then go and download a special JSDuck windows gem and install it:
> gem install jsduck-4.6.2.win.gem
If this all worked, then go buy yourself a beer, you really deserve it after making through all this hassle. I'd by you one by myself when I met you in person. You are my hero.
If the install still didn't succeed don't blame yourself. Go file a bug report and I'll try to help you out.