Last active
December 19, 2015 09:29
-
-
Save tyom/5933371 to your computer and use it in GitHub Desktop.
Use Pry (Rails) and Awesome Print outside of Bundler in Rails 3 (when other Rails developers don't want you adding good stuff into Gemfile)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
require 'pry-rails' | |
require 'awesome_print' | |
Pry.start | |
exit | |
rescue LoadError => e | |
warn 'Unable to load gems' | |
puts e | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if defined?(::Bundler) and File.exist?(ENV['GEM_HOME']) | |
$LOAD_PATH.concat Dir.glob("#{ENV['GEM_HOME']}/gems/*/lib") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Place the
global-gems.rb
in Railsconfig/initializers/
and add to.gitignore
if you only want to keep it to yourself.Install global gems: