Setup environment to compile Rubyk

Even if the current state of rubyk does not allow to use it in a real environment, it is still interesting to see the last progress of the development (and lately there has been a lot).

Currently Rubyk and liboscit are easy to compile on OSX and gnu/linux, and Mimas is only available on osx.

Setup

The prerequisites to compile Rubyk/Mimas/liboscit from sources are :

  • gcc (on gnu/linux)
  • Xcode (on OSX)
  • git (to fetch the sources)
  • Cmake (makefile generation)

gcc is usually shipped on every gnu/linux distro, but you may have to install the developers tools.

Xcode is available on Apple developers website. (It is free, but you have to register and be patient: the package is huge).

For git and Cmake, you may download the sources and compile them, but I found two installers that saved me some time :
git installer
Cmake installer

Rubyk

Once you have installed everything, open a terminal and create you working directory :

mkdir ~/rubyk
cd ~/rubyk

then clone Rubyk’s git tree :

git clone git://github.com/rubyk/rubyk.git rubyk

This will create another rubyk directory containing the latest rubyk sources. Next you need to get the sources of oscit and compile. This can be done with a single command :

cd rubyk
make

This will fetch the sources of oscit in vendor/oscit, create the makefiles by using cmake, compile and run the tests in “build” directory.

It is possible that you get some message about failing tests at the end, but this is normal as rubyk is still in a heavy development stage. And failing tests are always better than no tests :-)

Look in the build directory if you find the rubyk binary. If so rubyk is compiled and ready to be tested.

Mimas

But testing rubyk without mimas is less fun… To get mimas sources, the same procedure applies :

cd ~/rubyk
git clone http://github.com/rubyk/mimas.git mimas
cd mimas
git submodule init
git submodule update

Now you should have all the source that you need. Launch Xcode and open the Mimas.xcodeproj project in ~/rubyk/mimas/build/osx. Click on Build and Run, and enjoy !

Quentin Berthet

comments

  1. 2010-07-02 16:20 Gaspard Bucher

    Thanks for the writeup, Quentin ! I don’t know why typing “make” fails. I’ll try to fix this (maybe I could also add some rules in the makefile to do the submodule work as well…).

  2. 2010-07-02 22:11 Gaspard Bucher

    I fixed the need for the double cmake and added some settings so that running “make” in rubyk also fetches vendor/oscit submodule.

  3. leave a comment