Skip to content

Instantly share code, notes, and snippets.

View jeremy's full-sized avatar

Jeremy Daer jeremy

View GitHub Profile
# Dependencies: ruby, git, rubygems
sudo gem install bundler
git clone git://github.com/rails/rails.git
cd rails && gem bundle
ruby -rvendor/gems/environment railties/bin/rails ../new_app
cd ../new_app
# edit Gemfile to use:
# Configure generators to use sequel, haml, and shoulda.
config.generators do |g|
g.orm :sequel
g.template_engine :haml
g.test_framework :shoulda, :fixtures => true
end
# $/ is the ruby line separator, defaults to \n
$/ = '~'
File.open('some_file') do |file|
file.each_line do |line|
# ...
end
end
# $ ruby -Ilib active_support_test.rb
# ActiveSupport eating 2214 KB, loaded in 92 ms
require 'rubygems'
unless ENV['stdlib']
%w( active_support/vendor English base64 benchmark bigdecimal blankslate
builder cgi date date/format digest/md5 drb enumerator fast_xs fcntl
fileutils iconv kconv logger memcache mocha monitor openssl pathname
rational rexml/document securerandom set singleton stringio strscan