1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-07 09:08:01 +00:00

Add Require Entire Gemfile In A Pry Session as a ruby til

This commit is contained in:
jbranchaud
2016-06-14 21:19:54 -05:00
parent 1f14a12fc9
commit ad5bafb873
2 changed files with 20 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
# Require Entire Gemfile In Pry Session
Want to experiment in a pry session with some of the gems in your project's
`Gemfile`? You can quickly require all the gems for your project using
Bundler's `#require` method.
Just require `bundler` itself and then execute `Bundler.requie`. Everything
will be loaded in.
```ruby
> require 'bundler'
=> true
> Bundler.require
=> [Gem::Dependency.new("devise", Gem::Requirement.new([">= 0"]), :runtime),
Gem::Dependency.new("rails", Gem::Requirement.new(["= 4.2.5"]), :runtime),
Gem::Dependency.new("pg", Gem::Requirement.new(["~> 0.15"]), :runtime),
...
```