Skip to content

Instantly share code, notes, and snippets.

Eric Hurst erichurst

Block or report user

Report or block erichurst

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@viking
viking / Rakefile
Created Aug 9, 2011
Sequel Rake tasks for a Sinatra app
View Rakefile
# change foo to your library name
# change Foo::Database to your Sequel database
namespace :bundler do
task :setup do
require 'rubygems'
require 'bundler/setup'
end
end
View database.yml.example mysql2
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
# gem install mysql2
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8
@skojin
skojin / irb_require_without_bundler_hack.rb
Created Jan 25, 2011
workaround to load irb specific gem (loaded in .irbrc) in bundler environment, like rails3 console
View irb_require_without_bundler_hack.rb
# Add all gems in the global gemset to the $LOAD_PATH so they can be used in rails3 console with bundler
if defined?(::Bundler)
$LOAD_PATH.concat Dir.glob("#{ENV['rvm_path']}/gems/#{ENV['rvm_ruby_string']}@global/gems/*/lib")
end
You can’t perform that action at this time.