Tim Emiola | eb158ff | 2015-02-21 06:29:53 -0800 | [diff] [blame] | 1 | gRPC in 3 minutes (Ruby) |
| 2 | ======================== |
Tim Emiola | 49f3ccd | 2015-02-19 11:09:19 -0800 | [diff] [blame] | 3 | |
Tim Emiola | eb158ff | 2015-02-21 06:29:53 -0800 | [diff] [blame] | 4 | PREREQUISITES |
| 5 | ------------- |
Tim Emiola | 49f3ccd | 2015-02-19 11:09:19 -0800 | [diff] [blame] | 6 | |
Tim Emiola | eb158ff | 2015-02-21 06:29:53 -0800 | [diff] [blame] | 7 | This requires Ruby 2.1, as the gRPC API surface uses keyword args. |
Tim Emiola | 49f3ccd | 2015-02-19 11:09:19 -0800 | [diff] [blame] | 8 | |
| 9 | INSTALL |
| 10 | ------- |
| 11 | |
| 12 | - Clone this repository. |
| 13 | - Follow the instructions in [INSTALL](https://github.com/grpc/grpc/blob/master/INSTALL) to install the gRPC C core. |
Yang Gao | cec80ed | 2015-02-24 23:45:00 -0800 | [diff] [blame^] | 14 | - *Temporary* Install the full gRPC distribution from source on your local machine and update path: in [Gemfile](https://github.com/grpc/grpc-common/blob/master/ruby/Gemfile) to refer src/ruby within it. |
Tim Emiola | eb158ff | 2015-02-21 06:29:53 -0800 | [diff] [blame] | 15 | - this is necessary until the gRPC ruby gem is published |
Tim Emiola | 49f3ccd | 2015-02-19 11:09:19 -0800 | [diff] [blame] | 16 | - Use bundler to install |
| 17 | ```sh |
| 18 | $ # from this directory |
| 19 | $ gem install bundler && bundle install |
| 20 | ``` |
| 21 | |
Tim Emiola | eb158ff | 2015-02-21 06:29:53 -0800 | [diff] [blame] | 22 | Try it! |
| 23 | ------- |
Tim Emiola | 49f3ccd | 2015-02-19 11:09:19 -0800 | [diff] [blame] | 24 | |
| 25 | - Run the server |
| 26 | ```sh |
| 27 | $ # from this directory |
| 28 | $ bundle exec ./greeter_server.rb & |
| 29 | ``` |
| 30 | |
| 31 | - Run the client |
| 32 | ```sh |
| 33 | $ # from this directory |
| 34 | $ bundle exec ./greeter_client.rb |
| 35 | ``` |