|
|
11 anos atrás | |
|---|---|---|
| .. | ||
| bin | 11 anos atrás | |
| ext | 11 anos atrás | |
| lib | 11 anos atrás | |
| spec | 11 anos atrás | |
| .gitignore | 11 anos atrás | |
| .rspec | 11 anos atrás | |
| Gemfile | 11 anos atrás | |
| README.md | 11 anos atrás | |
| Rakefile | 11 anos atrás | |
| grpc.gemspec | 11 anos atrás | |
Directory structure is the recommended layout for ruby extensions
The extension can be built and tested using rake. However, the rake-extensiontask rule is not supported on older versions of rubygems, and the necessary version of rubygems.
This is resolved by using RVM instead; install a single-user ruby environment, and develop on the latest stable version of ruby (2.1.5).
Install RVM
$ command curl -sSL https://rvm.io/mpapis.asc | gpg --import - $ \curl -sSL https://get.rvm.io | bash -s stable --ruby $ $ # follow the instructions to ensure that your're using the latest stable version of Ruby $ # and that the rvm command is installed $ $ gem install bundler # install bundler, the standard ruby package manager
The extension can be built and tested using the Rakefile.
$ # create a workspace $ git5 start net/grpc $ $ # build the C library and install it in $HOME/grpc_dev $ /net/grpc/c/build_gyp/build_grpc_dev.sh $ $ # build the ruby extension and test it. $ cd google3_dir/net/grpc/ruby $ rake
Finally, install grpc ruby locally.
$ cd $ $ # update the Gemfile, modify the line beginning # gem 'beefcake' to refer to $ # the patched beefcake dir $ $ bundle install