background preloader

Gem Command Reference

Gem Command Reference

Ruby on Rails Guides Command Reference - RubyGems Guides What each gem command does, and how to use it. This reference was automatically generated from RubyGems version 2.5.1. gem build Build a gem from a gemspec Usage gem build GEMSPEC_FILE [options] Options: -​-force - skip validation of the spec Common Options: -h, -​-help - Get help on this command -V, -​-[no-]verbose - Set the verbose level of output -q, -​-quiet - Silence commands -​-config-file FILE - Use this config file instead of default -​-backtrace - Show stack backtrace on errors -​-debug - Turn on Ruby debugging Arguments GEMSPEC_FILE - gemspec file name to build a gem for Description The build command allows you to create a gem from a ruby gemspec. The best way to build a gem is to use a Rakefile and the Gem::PackageTask which ships with RubyGems. The gemspec can either be created by hand or extracted from an existing gem with gem spec: $ gem unpack my_gem-1.0.gem Unpacked gem: '... gem cert Manage RubyGems certificates and signing settings gem cert [options] gem cert --build you@example or:

Ruby Programming Ruby is an interpreted, object-oriented programming language. Its creator, Yukihiro Matsumoto, a.k.a “Matz,” released it to the public in 1995. Its history is covered here. The book is currently broken down into several sections and is intended to be read sequentially. Table of Contents[edit] Getting started[edit] Overview Installing Ruby Ruby editors Notation conventions Interactive Ruby Mailing List FAQ Basic Ruby[edit] Hello world Strings Alternate quotes Here documents Encoding Introduction to objects Ruby basics Data types — numbers, strings, hashes and arrays Writing methods Classes and objects Exceptions Ruby Semantic reference[edit] See also some rdoc documentation on the various keywords. Built in Classes[edit] This is a list of classes that are available to you by default in Ruby. Available Standard Library Modules[edit] These are parts of Ruby that you have available (in the standard library, or via installation as a gem). Other Libraries[edit] Database Interface Modules GUI Libraries[edit] RubyDoc

Ruby Gem Management with RVM and Bundler When I started learning Ruby, managing gems was a huge problem to the point I would make fun of it. Now I use RVM which helps you install multiple versions of ruby on one computer. Not only does it do that, but it makes gem management a breeze as well! Here I will outline how to install and configure RVM as well as manage your gems with RVM and the Rails 3 bundler. Installing RVM Install RVM by running this in terminal. Then drop this into your ~/.profile file. Run it with . ~/.profile in terminal. Installing Ruby 1.9.2 Use RVM to install the version of ruby you want. You can make double-sure by typing ruby -v and checking what version is currently loaded. Gem Management with RVM Now that we are up and running on ruby 1.9.2 lets talk about managing your gems. RVM has “gemsets” which allow you to organize different sets of gems. Create the global gemset. rvm gemset create global rvm gemset use global Install gems here that will be used in projects like bundler and passenger. bundle install

God - A Process Monitoring Framework in Ruby Stream Parsing with REXML Hi (again, sort of) :) I am still on my quest to write a program that parses a large XML file. After having tried to do it in tree mode, I had to realize that the performance was simply abysmal. So back to the drawing board. dusty (Guest) on 2008-01-12 19:56 I have found that hpricot works very well with large xml files. Bob Hutchison (Guest) on 2008-01-13 04:51 Hi Marc and Dusty, On 12-Jan-08, at 1:55 PM, dusty wrote: > I have found that hpricot works very well with large xml files. on 2008-01-13 06:26 on 2008-01-13 06:40 On Jan 12, 9:58 am, Marc Hoeppner <marc.hoepp... Thanks for the great responses! Robert Klemme (Guest) on 2008-01-13 19:05 On 13.01.2008 13:37, Marc Hoeppner wrote: > end>> So tag_end is then used if I want to puts everything that was done with> the element and its children like storing some values in an array or> something? on 2008-01-13 20:55 on 2008-01-14 08:51 on 2008-01-14 13:24 on 2008-01-14 13:45 on 2008-01-14 14:18 Please log in before posting.

The Bastards Book of Ruby jarmo/require_all Do YOU know Resque? Do YOU know Resque? This guest post is by Dave Hoover, who authored the book Apprenticeship Patterns: Guidance for the Aspiring Software Craftsman for O’Reilly, instigated the Software Craftsmanship North America conference, and is the Chief Craftsman at Obtiva. Dave began teaching himself to program in 2000, back when he was a family therapist. Web developers can sometimes forget the importance of doing as little work as possible during the HTTP request-response life-cycle. One nice thing about Resque is that it’s not dependant on Rails or any web framework. If I named this program idea_analyzer.rb and it was in my current working directory, I could run it like this: $ ruby idea_analyzer.rb I will learn ruby Analyzing your idea: I will learn ruby Asking for a job to analyze: I Asking for a job to analyze: will Asking for a job to analyze: learn Asking for a job to analyze: ruby Nice and simple. When we run this, we’ll get a different error. class WordAnalyzer end …and then require it.

Learn Web Development with the Ruby on Rails Tutorial Michael Hartl Contents Foreword My former company (CD Baby) was one of the first to loudly switch to Ruby on Rails, and then even more loudly switch back to PHP (Google me to read about the drama). Though I’ve worked my way through many Rails books, this is the one that finally made me “get” it. The linear narrative is such a great format. Enjoy! Derek Sivers (sivers.org) Founder, CD Baby Acknowledgments The Ruby on Rails Tutorial owes a lot to my previous Rails book, RailsSpace, and hence to my coauthor Aurelius Prochazka. I’d like to acknowledge a long list of Rubyists who have taught and inspired me over the years: David Heinemeier Hansson, Yehuda Katz, Carl Lerche, Jeremy Kemper, Xavier Noria, Ryan Bates, Geoffrey Grosenbach, Peter Cooper, Matt Aimonetti, Gregg Pollack, Wayne E. About the author Michael Hartl is the author of the Ruby on Rails Tutorial, the leading introduction to web development with Ruby on Rails. Copyright and license Welcome to the Ruby on Rails Tutorial.

RubyBindings - selenium - Ruby bindings - Browser automation framework The Ruby bindings for Selenium/WebDriver are available as the selenium-webdriver gem. The web page explains how to install the selenium-webdriver gem. On Mac OSX and linux you may need to prefix the rest of the command with the sudo command if the installation fails because of security restrictions on your computer. There are many other Selenium gems out there, but this is the only official, maintained gem. The bindings support Ruby 1.9.2 through 2.0.0, JRuby and Rubinius. The gem also includes the older selenium-client gem for use with Selenium RC. Selenium::WebDriver - the WebDriver API Selenium::Client - Selenium RC API (previously released as the selenium-client gem) The WebDriver API is the successor to the Selenium RC API. For people who already have tests written against the Selenium RC API, it's possible to use WebDriver-backed Selenium to ease the migration. The bindings provide a slightly rubified version of the WebDriver API: require "selenium-webdriver" puts driver.title Chrome

Related: