7

I want to write a Thrift service using Scrooge.

Thrift has almost no documentation and Scrooge has even less.

How do I install Scrooge on an Ubuntu or OSX machine?

Once installed, and I have created a .thrift, how do I use Scrooge to generate server code and client code?

Fernando Correia
  • 20,349
  • 10
  • 79
  • 113
Eric Hartford
  • 12,816
  • 4
  • 31
  • 46

1 Answers1

4

I created a giter8 template for you.

  1. Install conscript

    curl https://raw.github.com/n8han/conscript/master/setup.sh | sh

  2. Install giter8

    cs n8han/giter8

  3. Get my template

    g8 MasseGuillaume/scrooge

  4. Install sbt (I Like sbt-extra) + add sbt to your $PATH

    curl https://raw.github.com/paulp/sbt-extras/master/sbt > ~/bin/sbt

  5. apply default parameters

  6. Start a server on a terminal tab

    sbt server/run

  7. Start a client on another terminal tab when the server has started

    sbt client/run

Guillaume Massé
  • 7,057
  • 6
  • 37
  • 54
  • I had to add ~/bin to my $PATH – Eric Hartford Jun 27 '13 at 18:39
  • at the g8 step i get UnknownHostKey: github.com. RSA key fingerprint is 16:27:ac:a5:76:28:2d :36:63:1b:56:4d:eb:df:a6:48. investigating – Eric Hartford Jun 27 '13 at 18:40
  • on step 6 I get: [info] Set current project to api (in build file:/home/ericstob/authordetails/) [error] Expected ':' [error] Not a valid key: start (similar: state, target, start-year) [error] Server/start – Eric Hartford Jun 27 '13 at 19:09
  • sbt server/run (lower case s) made it work for me. Thanks! Marking answer. – Eric Hartford Jun 27 '13 at 20:20
  • Alternatively, on OSX, you can use `brew install giter8` to avoid installing conscript. You will need to have brew installed. But I would guess that more people have homebrew installed than conscript on OSX. – jedesah Jun 30 '14 at 18:31