Slide 1

Slide 1 text

Limitless RubyUnconf Hamburg 2019

Slide 2

Slide 2 text

Terence Lee @hone02

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Austin, TX

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

Sorry, this is a different kind of talk.

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

Dark Days of Dependency Management in Rails 2.3 # config/environment.rb Rails::Initializer.run do |config| # depend on latest version of paperclip config.gem "paperclip" config.gem "rspec", :version => "1.2.4" config.gem "cucumber", :version => "0.9.8" end

Slide 12

Slide 12 text

Install Gems into System $ rake gems:install

Slide 13

Slide 13 text

Just Gem Install $ gem install cucumber

Slide 14

Slide 14 text

Just Gem Install $ gem install cucumber --version 0.9.8

Slide 15

Slide 15 text

Unpack gems into vendor/ $ rake gems:unpack

Slide 16

Slide 16 text

Unpack a specific gem $ rake gems:unpack GEM=cucumber

Slide 17

Slide 17 text

This took a whole day

Slide 18

Slide 18 text

Gem Activation Errors

Slide 19

Slide 19 text

Dep Management on the Heroku Bamboo Stack # .gems hpricot --version '>= 0.2' --source code.whytheluckystiff.net dm-core --version 0.9.10

Slide 20

Slide 20 text

Dep Management on the Heroku Bamboo Stack -----> Installing gem hpricot >= 0.2 from http://code.whytheluckystiff.net Building native extensions. This could take a while... Successfully installed hpricot-0.6 1 gem installed -----> Installing gem dm-core 0.9.10 from http://gems.rubyforge.org Successfully installed addressable-2.0.2 Successfully installed extlib-0.9.10 Successfully installed data_objects-0.9.11 Successfully installed dm-core-0.9.10 4 gems installed

Slide 21

Slide 21 text

rails 2.3.6 May 23, 2010

Slide 22

Slide 22 text

actionpack, rack 1.0.1 -> rack 1.1.0

Slide 23

Slide 23 text

Gem Activation Error Missing the Rails gem. Please `gem install -v= 2.3.5`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.

Slide 24

Slide 24 text

Issues with runtime Gem Resolution gem "activemerchant", "1.4.2" # results in activating activemerchant, as well as # activesupport 3.0.pre, since it is >= 2.3.2 gem "rails", "2.3.4" # results in: # can't activate activesupport (= 2.3.4, runtime) # for ["rails-2.3.4"], already activated # activesupport-3.0.pre for ["activemerchant-1.4.2"]

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

merb All you need… nil you don’t

Slide 27

Slide 27 text

merb 2 == rails 3

Slide 28

Slide 28 text

Bundler 0.8: Gemfile

Slide 29

Slide 29 text

Bundler 0.9: Gemfile.lock

Slide 30

Slide 30 text

Terrible DX $ bundle lock

Slide 31

Slide 31 text

Terrible DX $ bundle lock $ bundle install

Slide 32

Slide 32 text

Terrible DX $ bundle lock $ bundle install $ bundle unlock

Slide 33

Slide 33 text

Bundler 1.0.0 August 29, 2010

Slide 34

Slide 34 text

Terrible DX $ bundle lock $ bundle install $ bundle unlock

Slide 35

Slide 35 text

Terrible DX $ bundle lock $ bundle install $ bundle unlock

Slide 36

Slide 36 text

Rocky Road

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

Why do we need a lockfile? After developing your application for a while, check in the application together with the Gemfile and Gemfile.lock snapshot. Now, your repository has a record of the exact versions of all of the gems that you used the last time you know for sure that the application worked... This is important: the Gemfile.lock makes your application a single package of both your own code and the third-party code it ran the last time you know for sure that everything worked. Specifying exact versions of the third-party code you depend on in your Gemfile would not provide the same guarantee, because gems usually declare a range of versions for their dependencies.

Slide 39

Slide 39 text

Alternatives ● isolate ● rvm gemsets

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

bundle exec

Slide 44

Slide 44 text

bundler is slow

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

Bundler 1.17 merged into Ruby 2.6

Slide 47

Slide 47 text

That's my story...

Slide 48

Slide 48 text

and it's your story

Slide 49

Slide 49 text

What did we learn?

Slide 50

Slide 50 text

Heroes

Slide 51

Slide 51 text

Heroes Leaders

Slide 52

Slide 52 text

Lockfiles

Slide 53

Slide 53 text

Can't Predict the Outcome ● Elixir -> mix.lock ● Rust -> cargo.lock ● Node.js -> package-lock.json, yarn.lock ● PHP -> composure.lock ● Go -> go.sum, Gopkg.lock ● Python -> poetry.lock, Pipfile.lock

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

So many more stories like these ● Bundler ● SASS ● Rails ● 12factor ● Testing + BDD ● Static Site Generators (Jekyll) ● Code Covenant ● RailsBridge ● RailsGirls ● CodeSchools/Bootcamps ● DevOps: Chef, Puppet, $ git push heroku master

Slide 56

Slide 56 text

Ruby is a Community of Innovators

Slide 57

Slide 57 text

Don't Accept the Status Quo

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

Don't Let Anyone Tell You What's Possible

Slide 60

Slide 60 text

Make People Believe

Slide 61

Slide 61 text

Inspire the Next Generation

Slide 62

Slide 62 text

Challenge the Limits