Downloading and Installing

Quick Install

The following works on Windows, Linux and OS X (and probably some more).

gem install gecoder-with-gecode

Troubleshooting

If you encounter an error that is not listed here then please let us know via the issue tracker.

Windows
ERROR: error installing gem [...]: buffer error

The above error message means that you need to upgrade RubyGems (it works with 1.2.0). Run the following command.

gem update --system
Linux
libgecodeset.so.8: cannot open shared object file: No such file or directory

If you get the above error message when requiring the Gecode/R gem then you need to add /usr/local/lib (where the Gecode libraries are stored) to ld.so.conf by doing the following as root.

echo "/usr/local/lib" >> /etc/ld.so.conf
/sbin/ldconfig

Detailed Information

Dependencies

Gecode/R requires Gecode 2.2.0. You can either manually install it or use the gem that includes Gecode.

RubyGems

Use the following gem if you don’t have Gecode installed, or are using Windows. It includes both Gecode/R and Gecode 2.2.0.

gem install gecoder-with-gecode

Use the following gem if you want to install Gecode/R without Gecode.

gem install gecoder

Direct Download

Gems are available from RubyGems . Source archives are available from GitHub .

Building from Source

There are two ways to get a hold of the source code.

The interface is installed as follows once the source is obtained. This is not tested under Windows (where it will probably differ a bit).

  1. Enter the ext directory.
  2. Run ruby extconf.rb
  3. Run make (builds the extension)
  4. Move the created library named gecode.so to the lib directory.

Running the Tests

To make sure that the installation was successful you can run the included specs. Install the dependencies using Bundler and then run the specs by issuing the following command from the directory where Gecode/R was installed.

rake specs