1 # Publish gem
2
3 To publish the gem with native extension, there are multiple steps to do.
4
5 ## Build the gem
6
7 - Make sure to publish the cli first since it will publish the `smbcloud-model` crate as well, which the gem depends on.
8 - Update the Cargo dependency in `gems/model/ext/model/Cargo.toml`.
9 - Build the gem: `bundle exec rake compile`.
10 - Update the gem version in the `gem/model/lib/model/version.rb`. Just use the same version as the `smbcloud-model` crate.
11 - Compile or build the gem directly: `bundle exec rake compile` or ` bundle exec rake buid`.
12 - Then publish the gem: `gem push pkg/smbcloud-model-{version}.gem`.