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

Development Environment 2019

Development Environment 2019

Eabad423977cfc6873b8f5df62b848a6?s=128

SHIBATA Hiroshi

June 14, 2019
Tweet

Transcript

  1. σϑΥϧτઃఆͰ฻Β͍ͨ͠ ࣲాതࢤ / GMO Pepabo, Inc. 2019.06.14 Pepabo Tech Friday

    June ։ൃ؀ڥ 2019
  2. ؀ڥΛ੔උ͢Δͷ͸ઐ໳৬ͷᅂΈ

  3. ϓϩάϥϚͷେਆث wλʔϛφϧ w4IFMM wΤσΟλ

  4. ϓϩάϥϚͷେਆث wλʔϛφϧ w4IFMM wΤσΟλ wϒϥ΢β

  5. λʔϛφϧ wߴઐ5FSB5FSN wେֶQVUUZ wࣾձਓJ5FSN wࣾձਓϖύϘ5FSNJOBMBQQ wݱࡏ"MBDSJUUZ

  6. 4IFMMͷར༻ཤྺ wߴઐUDTI wେֶࣾձਓCBTI wࣾձਓϖύϘೖࣾ਺೥લ·Ͱ[TI wݱࡏpTI

  7. ΤσΟλ wߴઐࣾձਓ&NBDT wࣾձਓϖύϘೖࣾ਺೥લ·Ͱ"UPN wݱࡏ7JTVBM4UVEJP$PEF

  8. ಓ۩ΛબͿͱ͖ͷϙϦγʔ

  9. ೥ͷબ୒ϙϦγʔ wࣗ෼ͷײ֮ʹ͍ۙඪ४ઃఆͷιϑτ΢ΣΞΛ࢖͏ɺ߹Θͳ͍ͱ͜Ζ͸ ΧελϚΠζ͔ࣗ෼͕׳ΕΔɻ w8JOEPXTͰ΋ग़དྷΔ͚ͩಉ͡ૢ࡞͕Մೳͳιϑτ΢ΣΞΛ࢖͏ɻ w3VTUͰॻ͔Ε͍ͯΔπʔϧ͸͍͍ͩͨྑ͍ ͳΜͱͳ͘

  10. "MBDSJUUZ w(16Λ࢖ͬͨ΍ͨΒ଎ͯ͘͵Δ͵Δಈ͘λʔϛφϧ wJ5FSNͷλϒػೳ͕ͳ͍ͷͰUNVYͰؤு͍ͬͯΔ wઃఆ͕ldDPOpHBMBDSJUUZBSBDSJUUZZNMzͱϙʔλ ϒϧͳͷ͕ྑ͍ɻ

  11. pTI w#BTI΍;TIͷγΣϧ͕ಈ͔ͳ͍໘౗ͳ΍ͭ ఘΊͨ  wઃఆΛೖΕͳͯ͘΋͍͍ͩͨ΍Γ͍ͨ͜ͱ ಛʹཤྺ ͕Ͱ͖Δ wϓϥάΠϯγεςϜͷpTIFSNBO࢖ͬͯɺ؀ڥ͸ͩ ͍͍ͨ࠶ݱՄೳ

  12. 74$PEF w֦ு͸͋·ΓೖΕͳ͍ ඞਢ͸&NBDT'SJFOEMZ,FZT͚ͩ  wϦϞʔτ΍MJWFTIBSFͳͲ͸ࢼ͠ʹೖΕΔ͚Ͳ͍͍ͩͨ์ஔ wAFAʹΤΠϦΞεͯ͠Δ wλʔϛφϧͱߦͬͨΓདྷͨΓͯ͠ޮ཰ѱ͍ͱײ͡Δ͕࣌͋ΔͷͰΤ σΟλ͚ͩͰ׬݁Ͱ͖ΔΑ͏ʹؤுΓ͍ͨʜ

  13. ։ൃ؀ڥͰ࠷ۙڵຯ͕͋Δ͜ͱ

  14. ࠷ۙڵຯ͕͋Δ͜ͱ w(/6DPSFVUJMTͷஔ͖׵͑ w(&.@)0.&ͷڞ༗ w9%(@

  15. (/6DPSFVUJMTͷஔ͖׵͑ wMTFYBMTE wDBUCBU wHSFQUIF@TJMWFS@TFBSDIFSSJQHSFQ ͍͍ͩͨ3VTU੡ͷπʔϧͳͷͰ3VTUؤுͬͯ͘Ε

  16. (&.@)0.&ͷڞ༗ w(&.@)0.&Λઃఆ͢Δͱ3VCZ(FNT͸ͦͷσΟϨΫτϦʹHFN ΛೖΕΔɻະࢦఆͷ৔߹͸ҎԼɻ w 3VCZ(FNT͸3VCZͰॻ͔Ε͍ͯΔίʔυͱ$Ͱॻ͔Ε͍ͯΔ ίʔυ͕͋Δ͕3VCZͰॻ͔Ε͍ͯΔίʔυ͸HFNTQFDͰ໌ࣔ͠ ͯͳ͍ݶΓෳ਺όʔδϣϯͰڞ༗ͯ͠ಈ͔͢͜ͱ͕Ͱ͖Δ ~ > l

    ~/.rbenv/versions/2.6.0-dev/lib/ruby/gems/2.6.0/ build_info cache doc extensions gems specifications
  17. (&.@)0.&Λڞ༗ͯ͠Έͨ w +3VCZ 5SV⒐F3VCZશͯͰ࢖͏HFNΛಉ͡σΟϨΫτϦ ʹೖΕΔ w ͰೖΕͨHFN͕Ͱͳ͍ɺͱ͍͏͜ͱ͕ͳ͘ͳͬͯḿΔ w ࣮͸HFNTQFD͕૿͑ΔͱSVCZͷىಈ͸஗͘ͳΔ w

    +3VCZͱࠞͥΔͱ3VCZ(FNTͷෆ۩߹͕ͲΜͲΜݟ͔ͭΔ ~ > l .local/share/gem/gems | wc -l 3843
  18. $֦ு͸ϦϏϧυ͢Δඞཁ͕͋Δ #!/usr/bin/env ruby require 'rubygems/commands/pristine_command' gems = Gem::Specification.all.map do |spec|

    [spec.name, spec.version] if spec.platform == RUBY_ENGINE && spec.missing_extensions? end.compact.uniq gems.each do |n,v| cmd = Gem::Commands::PristineCommand.new cmd.options[:args] = [n] cmd.options[:version] = v cmd.execute end
  19. ຖ೔࠷৽൛ʹ͢Δศརͳ΍ͭ #!/usr/bin/env bash eval "$(rbenv init -)" rbenv shell --unset

    brew upgrade brew cask upgrade rbenv global system rbenv uninstall -f 2.7.0-dev rbenv install 2.7.0-dev rbenv global 2.7.0-dev gem update rbenv shell 2.4 ~/Documents/github.com/hsbt/tools/exe/all-pristine rbenv shell 2.5 ~/Documents/github.com/hsbt/tools/exe/all-pristine rbenv shell 2.6 ~/Documents/github.com/hsbt/tools/exe/all-pristine rbenv shell 2.7 ~/Documents/github.com/hsbt/tools/exe/all-pristine ~/Documents/github.com/hsbt/tools/exe/gem-shebang rbenv shell --unset
  20. ͜ΕΛϓϩάϥϚશһʹ ఏڙ͍ͨ͠ΜͩΑͳ͋

  21. 9%(@$0/'*(@ wdDPOpHͱdMPDBMTIBSFʹઃఆϑΝΠϧΛ഑ஔ͢Δ wdͷ௚Լʹ͍ΖΜͳϑΝΠϧ͕ͨ͘͞ΜʹͳΒͳͯ͘ศར w࠷ۙͷπʔϧΛݟͯΔͱ͘Β͍͸9%(Λ࢖͏Α͏ʹͳ͖ͬͯͯ ͍Δɻ w3VCZͷπʔϧ΋ͦΕΒΛ࢖͏Α͏ʹ։ൃͯ͠ΔΑ wIUUQTHJUIVCDPNSVCZSVCZQVMM

  22. ͕࣌ؒ͋Ε͹  খཻͳπʔϧͷօ͞Μ

  23. খཻͳπʔϧͨͪ wHFNDPEFTFBSDI wBMMSVCZ wHFNTSD

  24. Demo ~ > gemsearch extension_build_error rb2exe-0.3.0/bin/traveling-ruby-2.2.2/l32/lib/ruby/2.2.0/rubygems/installer.rb: def extension_build_error(build_dir, output, backtrace

    = nil) # :nodoc: rb2exe-0.3.0/bin/traveling-ruby-2.2.2/l64/lib/ruby/2.2.0/rubygems/installer.rb: def extension_build_error(build_dir, output, backtrace = nil) # :nodoc: rb2exe-0.3.0/bin/traveling-ruby-2.2.2/osx/lib/ruby/2.2.0/rubygems/installer.rb: def extension_build_error(build_dir, output, backtrace = nil) # :nodoc: rb2exe-0.3.0/bin/traveling-ruby-2.2.2/win/lib/ruby/2.2.0/rubygems/installer.rb: def extension_build_error(build_dir, output, backtrace = nil) # :nodoc: ruby-compiler-0.1.1/vendor/ruby/lib/rubygems/installer.rb: def extension_build_error(build_dir, output, backtrace = nil) # :nodoc: rubygems-update-2.7.7/lib/rubygems/installer.rb: def extension_build_error(build_dir, output, backtrace = nil) # :nodoc: rubygems-update-2.7.7/lib/rubygems/installer.rb: deprecate :extension_build_error, :none, 2018, 12
  25. Demo all-ruby -e "puts ‘foo'&.match?(/foo/)" all-ruby -e "require 'tempfile'; p

    Tempfile.new.close!” all-ruby -e "require 'io/console'; p IO.method_defined?(:noecho)” all-ruby -e "require 'uri'; puts URI.const_defined?(:DEFAULT_PARSER)” all-ruby -e "p [].respond_to? :flat_map"
  26. Demo ~ > gem i rails clone http://rubyonrails.org -> /Users/hsbt/Documents/rubyonrails.org

    error Could not find version control system: http://rubyonrails.org exists /Users/hsbt/Documents/github.com/rails/rails Successfully installed rails-5.2.3 1 gem installed