Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Limitless - RubyUnconf Hamburg 2019

B87c43d4be875c9b41cd436f5c364f75?s=47 hone
May 25, 2019

Limitless - RubyUnconf Hamburg 2019

B87c43d4be875c9b41cd436f5c364f75?s=128

hone

May 25, 2019
Tweet

More Decks by hone

Other Decks in Research

Transcript

  1. Limitless RubyUnconf Hamburg 2019

  2. Terence Lee @hone02

  3. None
  4. Austin, TX

  5. None
  6. None
  7. None
  8. None
  9. Sorry, this is a different kind of talk.

  10. None
  11. 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
  12. Install Gems into System $ rake gems:install

  13. Just Gem Install $ gem install cucumber

  14. Just Gem Install $ gem install cucumber --version 0.9.8

  15. Unpack gems into vendor/ $ rake gems:unpack

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

  17. This took a whole day

  18. Gem Activation Errors

  19. Dep Management on the Heroku Bamboo Stack # .gems hpricot

    --version '>= 0.2' --source code.whytheluckystiff.net dm-core --version 0.9.10
  20. 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
  21. rails 2.3.6 May 23, 2010

  22. actionpack, rack 1.0.1 -> rack 1.1.0

  23. 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.
  24. 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"]
  25. None
  26. merb All you need… nil you don’t

  27. merb 2 == rails 3

  28. Bundler 0.8: Gemfile

  29. Bundler 0.9: Gemfile.lock

  30. Terrible DX $ bundle lock

  31. Terrible DX $ bundle lock $ bundle install

  32. Terrible DX $ bundle lock $ bundle install $ bundle

    unlock
  33. Bundler 1.0.0 August 29, 2010

  34. Terrible DX $ bundle lock $ bundle install $ bundle

    unlock
  35. Terrible DX $ bundle lock $ bundle install $ bundle

    unlock
  36. Rocky Road

  37. None
  38. 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.
  39. Alternatives • isolate • rvm gemsets

  40. None
  41. None
  42. None
  43. bundle exec

  44. bundler is slow

  45. None
  46. Bundler 1.17 merged into Ruby 2.6

  47. That's my story...

  48. and it's your story

  49. What did we learn?

  50. Heroes

  51. Heroes Leaders

  52. Lockfiles

  53. 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
  54. None
  55. 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
  56. Ruby is a Community of Innovators

  57. Don't Accept the Status Quo

  58. None
  59. Don't Let Anyone Tell You What's Possible

  60. Make People Believe

  61. Inspire the Next Generation

  62. Challenge the Limits