跳到主要內容

發表文章

目前顯示的是有「gemcutter」標籤的文章

建立自己第一個gem

1. 先要有https://rubygems.org/帳號 2. 安裝環境必要套件 $ gem update --system $ gem install rubygems-update Fetching: rubygems-update-2.7.6.gem (100%) Successfully installed rubygems-update-2.7.6 Parsing documentation for rubygems-update-2.7.6 Installing ri documentation for rubygems-update-2.7.6 Done installing documentation for rubygems-update after 28 seconds 1 gem installed $ update_rubygems 3. 建立gem資料夾 (voteable_shawn) $mkdir voteable_shawn $cd voteable_shawn $mkdir lib 4. 設定檔 voteable_shawn/voteable_shawn.gemspec Gem::Specification.new do |s|   s.name        = 'voteable_shawn'   s.version     = '0.0.0'   s.licenses    = ['MIT']   s.summary     = "This is a voteable gem example!"   s.description = "The voting gem!"   s.authors     = ["Shawn"]   s.email       = 'shawnkuo67@gmail.com'   s.files       = ["lib/vote...