サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
災害への備え
guides.rubygems.org
Want to better protect your RubyGems.org account? Your RubyGems.org account is important! Unauthorized access of your account can lead to irrevocable damage to your gem’s reputation. We highly recommend that you enable MFA for both UI and API. When enabled, this will mean that you need to use MFA for signing into RubyGems.org and when running gem signin, push, owner --add, owner --remove and yank.
SSL Certificate Updates If you’ve seen the following SSL error when trying to pull updates from RubyGems: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed This error happens when your computer is missing a file that it needs to verify that the server behind RubyGems.org is the correct one. Follow the steps outlined in the RubyG
The main goal of these recommendations is to give the user some clue about how to require the files in your gem. Following these conventions also lets Bundler require your gem with no extra configuration. If you publish a gem on rubygems.org it may be removed if the name is objectionable, violates intellectual property or the contents of the gem meet these criteria. You can report such a gem to su
Creating a gem that includes an extension that is built at install time. Many gems use extensions to wrap libraries that are written in C with a ruby wrapper. Examples include nokogiri which wraps libxml2 and libxslt, pg which is an interface to the PostgreSQL database and the mysql and mysql2 gems which provide an interface to the MySQL database. Creating a gem that uses an extension involves sev
Start with an idea, end with a distributable package of Ruby code. Ways to share your gem code with other users. Introduction Sharing Source Code Serving Your Own Gems Publishing to RubyGems.org Push Permissions on RubyGems.org Gem Security Introduction Now that you’ve created your gem, you’re probably ready to share it. While it is perfectly reasonable to create private gems solely to organize th
Need to serve gems locally or for your organization? There are times you would like to run your own gem server. You may want to share gems with colleagues when you are both without internet connectivity. You may have private code, internal to your organization, that you’d like to distribute and manage as gems without making the source publicly available. There are a few options to set up a server
The Specification class contains the information for a gem. Typically defined in a .gemspec file or a Rakefile, and looks like this: Gem::Specification.new do |s| s.name = 'example' s.version = '0.1.0' s.licenses = ['MIT'] s.summary = "This is an example!" s.description = "Much longer explanation of the example!" s.authors = ["Ruby Coder"] s.email = 'rubycoder@example.com' s.files = ["lib/example.
Unpack the mystery behind what’s in a RubyGem. Structure of a Gem Each gem has a name, version, and platform. For example, the rake gem has a 13.0.6 version (from Jul 2021). Rake’s platform is ruby, which means it works on any platform Ruby runs on. Platforms are based on the CPU architecture, operating system type and sometimes the operating system version. Examples include “x86-mingw32” or “java
Common practices to make your gem users’ and other developers’ lives easier. Consistent naming Semantic versioning Declaring dependencies Loading code Prerelease gems Consistent naming There are only two hard things in Computer Science: cache invalidation and naming things. -Phil Karlton File names Be consistent with how your gem files in lib and bin are named. The hola gem from the make your own
Tutorials, guides, FAQs for RubyGems package managementThis guide explains how to package a C extension as a rubygem. To get started, we’ll add a C method to the hola gem from the make your own gem guide. Then there’s some general advice and some references for further reading. Tutorial: Add a C extension to hola At the end of the make your own gem guide, hola looked like this: % tree . |-- bin |
Details on interacting with RubyGems.org over HTTP. NOTE: The API is a work in progress, and can use your help! RubyGems itself and the RubyGems gem use the API to push gems, add owners, and more. API Authorization: How to authenticate with RubyGems.org Rate Limits Gem Methods: Query or create gems to be hosted Gem Version Methods: Query for information about versions of a particular gem Gem Downl
From start to finish, learn how to package your Ruby code in a gem. Note: Many people use Bundler to create Gems. You can learn how to do that by reading the “Developing a RubyGem using Bundler” guide on the Bundler website. Introduction Your first gem Requiring more files Adding an executable Writing tests Documenting your code Wrapup Introduction Creating and publishing your own gem is simple th
Learn how RubyGems works, and how to make your own. The RubyGems software allows you to easily download, install, and use ruby software packages on your system. The software package is called a “gem” which contains a packaged Ruby application or library. Gems can be used to extend or modify functionality in Ruby applications. Commonly they’re used to distribute reusable functionality that is share
What each gem command does, and how to use it. This reference was automatically generated from RubyGems version 3.5.17. gem build gem cert gem check gem cleanup gem contents gem dependency gem environment gem exec gem fetch gem generate_index gem help gem info gem install gem list gem lock gem mirror gem open gem outdated gem owner gem pristine gem push gem query gem rdoc gem rebuild gem search ge
このページを最初にブックマークしてみませんか?
『Guides - RubyGems Guides』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く