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

Rails Tutorialを Phoenixで移植してみた

hagiyat
August 25, 2015

Rails Tutorialを Phoenixで移植してみた

  *      *
  *     +  うそです
     n ∧_∧ n
 + (ヨ(* ´∀`)E)
      Y     Y    *

hagiyat

August 25, 2015
Tweet

Other Decks in Programming

Transcript

  1. ֤Gemͷ୅ସΛ୳͢ Rails Phoenix sqlite3 EctoͰαϙʔτ sass-rails brunch-config.jsͰઃఆ͢Ε͹OK uglifier brunch-config.jsͰઃఆ͢Ε͹OK coffee-rails

    brunch-config.jsͰઃఆ͢Ε͹OKͷ͸ͣɻެࣜυΩϡϝϯ τʹTypescriptʹ͍ͭͯͷݴٴ͕͋Γ·͢ jquery-rails brunch-config.jsͰઃఆ͢Ε͹OK turbolinks ͳ͍ʂ jbuilder ViewͰରԠ sdoc ex_doc http://d.hatena.ne.jp/k-1/20130505/p1 rails_12factor ެࣜυΩϡϝϯτʹهࡌ͋Γ http://www.phoenixframework.org/docs/heroku
  2. rails server/rails console RubyͰ͋Ε͹ଈPryؔ࿈ͷGemΛ͋Ε͜ΕಥͬࠐΉ͚Ͳɺiex͸ ૉͰ΋ઓ͑Δ iex -S mix phoenix.server ͸ɺrails

    server݉rails consoleͰɺ tmuxʹ΍͍͞͠ ิ׬͕ຊ౰ʹര଎ byebug΋ඪ४ͰೖͬͯΔ(ϒϨΠΫϙΠϯτషΔͷ͸؆୯ɻ΋͠ ͔ͯ͠εςοϓ࣮ߦͰ͖ͳ͍ʁ) show-doc͸Ͱ͖Δ͚Ͳshow-source͸Ͱ͖ͳ͍ʁʁ
  3. Elixirʹ͍ͭͯͷ·ͱΊ - ݴޠฤ |> ͸Ϡό͍ RubyͰϝιουνΣΠϯ͕ݏ͍ͩͬͨਓʹ΋Φεεϝ͍ͨ͠ “hoge,fuga,piyo,baz” |> String.split(“,”) ͱ͍͏۩߹ʹɺॲ

    ཧͷίϯςΩετ͕pipeͷ௚ޙʹ͋Δ(͜ͷྫͩͱString)ͬ ͯɺಡΈ΍ͯ͘͢Θ͔Γ΍͘͢ͳ͍Ͱ͔͢ʁ ฒྻॲཧ͕ຊ౰ʹΧδϡΞϧʹͰ͖Δ spawn_linkͱ͔؆୯͗͢ͰΘ͔Γ΍͗͢͢