mirror of https://github.com/grpc/grpc.git
The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
https://grpc.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Tag:
Branch:
Tree:
05998dc693
1.33.1
objective-c-v1.0.0-pre1
objective-c-v1.0.2
release-0_10
release-0_10_0
release-0_10_0-objectivec-0.6.0
release-0_10_1
release-0_10_1-node-0.10.1
release-0_10_2
release-0_11
release-0_11_0
release-0_11_1
release-0_11_1-objectivec-0.11.1
release-0_12
release-0_12_0
release-0_12_0-objectivec-0.12.0
release-0_13
release-0_13_0
release-0_13_0-objectivec-0.13.0
release-0_13_1
release-0_14
release-0_14_0
release-0_14_0-objective-c-0.14.0
release-0_14_0-objectivec-0.14.0
release-0_14_1
release-0_15
release-0_15_0
release-0_15_1
release-0_5
release-0_5_0
release-0_6
release-0_6_0
release-0_9
release-0_9_0
release-0_9_1
release-0_9_1-node-0.9.2
release-0_9_1-objectivec-0.5.1
release_test
v0.15.0
v0.15.2
v1.0.0
v1.0.0-pre2
v1.0.1
v1.0.1-pre1
v1.1.0
v1.1.0-pre1
v1.1.1
v1.1.2
v1.1.3
v1.1.4
v1.10.0
v1.10.0-pre1
v1.10.0-pre2
v1.10.1
v1.10.1-pre1
v1.11.0
v1.11.0-pre1
v1.11.0-pre2
v1.11.1
v1.11.1-pre1
v1.12.0
v1.12.0-pre1
v1.12.1
v1.13.0
v1.13.0-pre1
v1.13.0-pre2
v1.13.0-pre3
v1.13.1
v1.14.0
v1.14.0-pre1
v1.14.0-pre2
v1.14.1
v1.14.2
v1.14.2-pre1
v1.15.0
v1.15.0-pre1
v1.15.1
v1.16.0
v1.16.0-pre1
v1.16.1
v1.16.1-pre1
v1.17.0
v1.17.0-pre1
v1.17.0-pre2
v1.17.0-pre3
v1.17.1
v1.17.1-pre1
v1.17.2
v1.18.0
v1.18.0-pre1
v1.19.0
v1.19.0-pre1
v1.19.1
v1.2.0
v1.2.0-pre2
v1.2.1
v1.2.2
v1.2.3
v1.2.4
v1.2.5
v1.20.0
v1.20.0-pre1
v1.20.0-pre2
v1.20.0-pre3
v1.20.1
v1.21.0
v1.21.0-pre1
v1.21.1
v1.21.2
v1.21.3
v1.21.3-pre1
v1.21.4
v1.21.4-pre1
v1.22.0
v1.22.0-pre1
v1.22.1
v1.23.0
v1.23.0-pre1
v1.23.1
v1.24.0
v1.24.0-pre1
v1.24.0-pre2
v1.24.1
v1.24.2
v1.24.3
v1.25.0
v1.25.0-pre1
v1.26.0
v1.26.0-pre1
v1.27.0
v1.27.0-pre1
v1.27.0-pre2
v1.27.1
v1.27.2
v1.27.3
v1.28.0
v1.28.0-pre1
v1.28.0-pre2
v1.28.0-pre3
v1.28.1
v1.28.2
v1.29.0
v1.29.1
v1.3.0
v1.3.1
v1.3.2
v1.3.3
v1.3.4
v1.3.5
v1.3.6
v1.3.7
v1.3.9
v1.30.0
v1.30.0-pre1
v1.30.1
v1.30.2
v1.31.0
v1.31.0-pre1
v1.31.0-pre2
v1.31.1
v1.32.0
v1.32.0-pre1
v1.33.0
v1.33.0-pre1
v1.33.0-pre2
v1.33.1
v1.33.2
v1.34.0
v1.34.0-pre1
v1.34.1
v1.35.0
v1.35.0-pre1
v1.36.0
v1.36.0-pre1
v1.36.1
v1.36.2
v1.36.3
v1.36.4
v1.37.0
v1.37.0-pre1
v1.37.1
v1.38.0
v1.38.0-pre1
v1.38.1
v1.39.0
v1.39.0-pre1
v1.39.1
v1.4.0
v1.4.0-pre1
v1.4.1
v1.4.2
v1.4.3
v1.4.4
v1.4.5
v1.4.6
v1.4.7
v1.40.0
v1.40.0-pre1
v1.41.0
v1.41.0-pre1
v1.41.0-pre2
v1.41.1
v1.42.0
v1.42.0-pre1
v1.43.0
v1.43.0-pre1
v1.43.2
v1.44.0
v1.44.0-pre1
v1.44.0-pre2
v1.44.1
v1.45.0
v1.45.0-pre1
v1.45.1
v1.45.2
v1.45.3
v1.46.0
v1.46.0-pre1
v1.46.0-pre2
v1.46.1
v1.46.2
v1.46.3
v1.46.4
v1.46.5
v1.46.6
v1.46.7
v1.47.0
v1.47.0-pre1
v1.47.1
v1.47.2
v1.47.3
v1.47.4
v1.47.5
v1.48.0
v1.48.0-pre1
v1.48.1
v1.48.2
v1.48.3
v1.48.4
v1.49.0
v1.49.0-pre1
v1.49.0-pre2
v1.49.0-pre3
v1.49.1
v1.49.2
v1.49.3
v1.49.4
v1.50.0
v1.50.0-pre1
v1.50.1
v1.50.2
v1.51.0
v1.51.0-pre1
v1.51.1
v1.51.2
v1.51.3
v1.52.0
v1.52.0-pre1
v1.52.0-pre2
v1.52.1
v1.52.2
v1.53.0
v1.53.0-pre1
v1.53.0-pre2
v1.53.1
v1.53.2
v1.54.0
v1.54.0-pre1
v1.54.0-pre2
v1.54.1
v1.54.2
v1.54.3
v1.55.0
v1.55.0-pre1
v1.55.0-pre2
v1.55.1
v1.55.3
v1.55.4
v1.56.0
v1.56.0-pre1
v1.56.0-pre2
v1.56.0-pre3
v1.56.1
v1.56.1-pre1
v1.56.2
v1.56.3
v1.56.4
v1.57.0
v1.57.0-pre1
v1.57.1
v1.58.0
v1.58.0-pre1
v1.58.1
v1.58.2
v1.58.3
v1.59.0
v1.59.0-pre1
v1.59.0-pre2
v1.59.1
v1.59.2
v1.59.3
v1.59.4
v1.59.5
v1.6.0
v1.6.0-pre1
v1.6.1
v1.6.2
v1.6.3
v1.6.4
v1.6.5
v1.6.6
v1.6.7
v1.60.0
v1.60.0-pre1
v1.60.1
v1.60.2
v1.61.0
v1.61.0-pre1
v1.61.0-pre2
v1.61.0-pre3
v1.61.1
v1.61.2
v1.61.3
v1.62.0
v1.62.0-pre1
v1.62.1
v1.62.2
v1.62.3
v1.63.0
v1.63.0-pre1
v1.63.0-pre2
v1.63.1
v1.63.2
v1.64.0
v1.64.0-pre1
v1.64.0-pre2
v1.64.1
v1.64.2
v1.64.3
v1.65.0
v1.65.0-pre1
v1.65.0-pre2
v1.65.1
v1.65.2
v1.65.3
v1.65.4
v1.65.5
v1.66.0
v1.66.0-pre1
v1.66.0-pre2
v1.66.0-pre3
v1.66.0-pre4
v1.66.0-pre5
v1.66.1
v1.66.2
v1.67.0
v1.67.0-pre1
v1.67.1
v1.68.0
v1.68.0-pre1
v1.7.0
v1.7.1
v1.7.2
v1.7.3
v1.8.0
v1.8.0-pre2
v1.8.1
v1.8.2
v1.8.3
v1.8.4
v1.8.5
v1.8.6
v1.9.0
v1.9.0-pre1
v1.9.0-pre2
v1.9.0-pre3
v1.9.1
${ noResults }
1.7 KiB
1.7 KiB
gRPC in 3 minutes (Ruby)
BACKGROUND
For this sample, we've already generated the server and client stubs from helloworld.proto
PREREQUISITES
-
Ruby 2.x This requires Ruby 2.x, as the gRPC API surface uses keyword args. If you don't have that installed locally, you can use RVM to use Ruby 2.x for testing without upgrading the version of Ruby on your whole system. RVM is also useful if you don't have the necessary privileges to update your system's Ruby.
$ # RVM installation as specified at https://rvm.io/rvm/install $ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 $ \curl -sSL https://get.rvm.io | bash -s stable --ruby=ruby-2 $ $ # follow the instructions to ensure that your're using the latest stable version of Ruby $ # and that the rvm command is installed
-
N.B Make sure your run
source $HOME/.rvm/scripts/rvm
as instructed to complete the set-up of RVM.
INSTALL
-
Use bundler to install the example package's dependencies
$ # from this directory $ gem install bundler # if you don't already have bundler available $ bundle install
Try it!
-
Run the server
$ # from this directory $ bundle exec ./greeter_server.rb &
-
Run the client
$ # from this directory $ bundle exec ./greeter_client.rb
Tutorial
You can find a more detailed tutorial in gRPC Basics: Ruby