forked from cheat/cheatsheets
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cheat#51 from luathn/add-ruby-gem-cheatsheets
Add ruby and gem cheatsheet
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
tags: [ packaging, ruby ] | ||
--- | ||
# To search for a package: | ||
gem search <package> | ||
|
||
# To install a package: | ||
gem install <package> | ||
|
||
# To install a package in user space: | ||
gem install --user-install <package> | ||
|
||
# To install specific version of a package: | ||
gem install <package> -v <version> | ||
|
||
# To uninstall a package: | ||
gem uninstall <package> | ||
|
||
# To upgrade a package: | ||
gem update <package> | ||
|
||
# To show details of a package: | ||
gem info <package> | ||
|
||
# To list local packages: | ||
gem list --local | ||
|
||
# To show help on command: | ||
gem help <command> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Ruby - Interpreted object-oriented scripting language | ||
# Main page: https://www.ruby-lang.org/ | ||
# Help and documentation: https://ruby-doc.org/ | ||
|
||
# To serve the current directory: | ||
ruby -run -e httpd . -p <port> | ||
|
||
# To execute a script file: | ||
ruby <file> | ||
|
||
# To execute one line of script: | ||
ruby -e 'command' | ||
|
||
# To check script file syntax: | ||
ruby -c <file> | ||
|
||
# To specify $LOAD_PATH directory: | ||
ruby -Idirectory | ||
ruby -Ispec spec/test_spec.rb |