Repository navigation
ruby
Chris Hofstaedtler edited this page Jun 22, 2025
·
2 revisions
Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.
The following Debian packages are shipped with grml out-of-the-box:
- dpkg-ruby: ruby interface for dpkg
- irb: Interactive Ruby
- rake: a ruby build program
- rdoc: Generate documentation from ruby source files
- ruby1.8-examples: Examples for Ruby 1.8
- ruby-prof: A fast code profiler for Ruby
- vim-ruby: Vi IMproved - enhanced vi editor - with Ruby support
Not shipped with grml but interesting Debian packages/software anyway:
- rails: MVC ruby based framework geared for web application development
- ri: Ruby Interactive reference (ri)
- ruby-full: Ruby full installation
- ruby-pkg-tools: Tools for building Debian Ruby packages
- ruby1.9-examples: Examples for Ruby 1.9
- rubybook: the "Programming Ruby" book
- rubygems: package management framework for Ruby libraries/applications
See ':help if_ruby' in vim-ruby and vim-ruby.rubyforge.org.
irb is an Interactive Ruby shell, tune its configuration via ~/.irbrc. The following configuration file it the one shipped with grml by default:
# we want to be able to use tab-completion in irb:
require 'irb/completion'
ARGV.concat [ "--readline", "--prompt-mode", "simple" ]
# we want to get a history file of our session:
module Readline
module History
LOG = "#{ENV['HOME']}/.irb-history"
def self.write_log(line)
File.open(LOG, 'ab') {|f| f << "#{line}\n"}
end
def self.start_session_log
write_log("\n# session start: #{Time.now}\n\n")
at_exit { write_log("\n# session stop: #{Time.now}\n") }
end
end
alias :old_readline :readline
def readline(*args)
ln = old_readline(*args)
begin
History.write_log(ln)
rescue
end
ln
end
end
Readline::History.start_session_log
# simple prompt?
# IRB.conf[:PROMPT_MODE] = :SIMPLE
# prompt for easy copy/paste? start with irb --prompt xmp
IRB.conf[:PROMPT][:XMP][:RETURN] = "\# => %s\n"
# copy/paste from manpage:
# IRB.conf[:IRB_NAME]="irb"
# IRB.conf[:MATH_MODE]=false
# IRB.conf[:USE_TRACER]=false
# IRB.conf[:USE_LOADER]=false
# IRB.conf[:IGNORE_SIGINT]=true
# IRB.conf[:IGNORE_EOF]=false
# IRB.conf[:INSPECT_MODE]=nil
# IRB.conf[:IRB_RC] = nil
# IRB.conf[:BACK_TRACE_LIMIT]=16
# IRB.conf[:USE_LOADER] = false
# IRB.conf[:USE_READLINE] = nil
# IRB.conf[:USE_TRACER] = false
# IRB.conf[:IGNORE_SIGINT] = true
# IRB.conf[:IGNORE_EOF] = false
# IRB.conf[:PROMPT_MODE] = :DEFAULT
# IRB.conf[:PROMPT] = {...}
# IRB.conf[:DEBUG_LEVEL]=0
# IRB.conf[:VERBOSE]=true
- Ruby-Lang.org
- Ruby-Doc.org
- Ruby Class and Library Reference
- RAA - Ruby Application Archive
- Rubygarden Wiki
- RubySpec Wiki
- Ruby Style Guide
- Ruby Hacking Guide
- Visualization of Ruby's Grammar
- eigenclass.org - a Ruby-centric blog and a repository of information and code
- Ruby2CExtension - a Ruby to C extension translator/compiler
- The Little Book Of Ruby - free PDF book
- Why's (Poignant) Guide to Ruby
- RubyNode - a library that allows read only access to Ruby’s internal NODE structure