Skip to content

Instantly share code, notes, and snippets.

@rplaurindo
Last active May 12, 2020 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rplaurindo/8530116 to your computer and use it in GitHub Desktop.
Save rplaurindo/8530116 to your computer and use it in GitHub Desktop.

Working with gems

Generating a new gem structure

$ bundle gem <gem_name>

Adding an owner

$ gem owner <gem> -a <user or email>

Publishing

$ gem build <gem_name>.gemspec

$ gem push <gem_name>-<version>.gem

Note: the "others" group should has "4" as minimal permission.

Searching

$ gem search -a <gem_name>

Removing a published gem

$ gem yank <gem_name> -v <version>

An useful gem to manage dependencies

Bundler

Updating

To update the gem and its dependencies, do that:

$ bundle update <gem_name>

To update just the gem

$ bundle update --source <gem_name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment