Skip to content

Instantly share code, notes, and snippets.

@tyom
Last active December 19, 2015 09:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tyom/5933371 to your computer and use it in GitHub Desktop.
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)
begin
require 'pry-rails'
require 'awesome_print'
Pry.start
exit
rescue LoadError => e
warn 'Unable to load gems'
puts e
end
if defined?(::Bundler) and File.exist?(ENV['GEM_HOME'])
$LOAD_PATH.concat Dir.glob("#{ENV['GEM_HOME']}/gems/*/lib")
end
@tyom
Copy link
Author

tyom commented Jul 5, 2013

Place the global-gems.rb in Rails config/initializers/ and add to .gitignore if you only want to keep it to yourself.

Install global gems:

gem install 'pry-rails'
gem install 'awesome_print'
rails console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment