Haml: ์—๋ฃจ๋น„ ์Šˆํผํด๋ž˜์Šค ๋ถˆ์ผ์น˜

์— ๋งŒ๋“  2017๋…„ 08์›” 04์ผ  ยท  11์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: haml/haml

์˜ค๋ฅ˜ ์„ค๋ช…

erubi ๋Œ€ํ•œ ์ข…์†์„ฑ์ด ์žˆ๋Š” better_errors 2.3.0์œผ๋กœ Rails ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์‹คํ–‰ํ•˜๋ ค๊ณ  ํ•˜๋ฉด(2.2.0์—์„œ์™€ ๊ฐ™์ด erubis ๋Œ€์‹ ) ๋‹ค์Œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

.bundle/ruby/2.4.0/gems/haml-5.0.2/lib/haml/helpers/safe_erubi_template.rb:5: warning: toplevel constant Erubi referenced by ActionView::Template::Handlers::ERB::Erubi
rails aborted!
TypeError: superclass must be a Class (Module given)
.bundle/ruby/2.4.0/gems/haml-5.0.2/lib/haml/helpers/safe_erubi_template.rb:5:in `<module:Haml>'
.bundle/ruby/2.4.0/gems/haml-5.0.2/lib/haml/helpers/safe_erubi_template.rb:4:in `<top (required)>'
.bundle/ruby/2.4.0/gems/activesupport-5.0.5/lib/active_support/dependencies.rb:293:in `require'
.bundle/ruby/2.4.0/gems/activesupport-5.0.5/lib/active_support/dependencies.rb:293:in `block in require'

๊ตฌ์„ฑ

  • ๋ ˆ์ผ 5.0.5
  • ํ–„ 5.0.2
  • ํ–„๋ ˆ์ผ 1.0.0
  • ๋” ๋‚˜์€ ์˜ค๋ฅ˜ 2.3.0

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

์ด ๋ฌธ์ œ๋„ ์žˆ์—ˆ๊ณ  gem Better Errors๋ฅผ 2.2.0์œผ๋กœ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.
๊ทธ๋Ÿฌ๋‚˜ ์˜ค๋Š˜ ๋‚ด ์•ฑ์ด ๋™์ผํ•œ ์˜ค๋ฅ˜๋กœ ๋‹ค์‹œ ์ค‘๋‹จ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
์ด๋ฒˆ์—๋Š” i18n-tasks 0.9.17์ด ์›์ธ์ž…๋‹ˆ๋‹ค! ์ด ๋ฌธ์ œ๋ฅผ 0.9.16์œผ๋กœ ์ˆ˜์ •ํ•˜๋Š” ๊ฒƒ์ด ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค.

์ด๊ฒƒ์ด ๋ˆ„๊ตฐ๊ฐ€๋ฅผ ๋•๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.

๋ชจ๋“  11 ๋Œ“๊ธ€

Rails 4์—์„œ๋„ ์ด ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

  • ํ–„ 5.0.2
  • ๋” ๋‚˜์€ ์˜ค๋ฅ˜ 2.3.0
  • ํ•˜๋ฉ” ๋ ˆ์ผ 1.0.0
  • ๋ ˆ์ผ 4.2.8

better_errors๋ฅผ ์ œ๊ฑฐํ•˜๋ฉด ๋ฌธ์ œ๋ฅผ ํ”ผํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

better_errors 2.3.0์€ erubi ์— ๋Œ€ํ•œ ์ข…์†์„ฑ์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค. ์ด๋Š” better_errors๊ฐ€ Gemfile์— ์žˆ๋Š”์ง€ ์—ฌ๋ถ€์— ๊ด€๊ณ„์—†์ด Gemfile์— erubi ๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ ์žฌํ˜„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Erubis๊ฐ€ ๋ฒˆ๋“ค์— ์ถ”๊ฐ€๋˜๋ฉด haml์€ Erubi๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค. Rails 5.0.5์—์„œ๋Š” lib/haml/helpers/safe_erubi_template.rb ์˜ class ์„ ์–ธ ๋ผ์ธ์—์„œ ์˜ˆ์™ธ๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

module Haml
  class ErubiTemplateHandler < ActionView::Template::Handlers::ERB::Erubi

ActionView::Template::Handlers::ERB::Erubi ๋Š” ๋งค์šฐ ์‹ ๋น„ํ•œ ๊ฐ์ฒด์ด์ง€๋งŒ Erubi ๋ชจ๋“ˆ์— ๋Œ€ํ•œ ์ˆœ์ˆ˜ํ•œ ์ฐธ์กฐ์ธ ๊ฒƒ์œผ๋กœ ๋ณด์ด๋ฉฐ ๊ฒฝ๊ณ ๋„ ์„ค๋ช…ํ•ฉ๋‹ˆ๋‹ค.

> Where.is(ActionView::Template::Handlers::ERB::Erubi)
(pry):1: warning: toplevel constant Erubi referenced by ActionView::Template::Handlers::ERB::Erubi
=> ["/usr/local/var/rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/erubi-1.6.1/lib/erubi.rb", 24]

actionview, erubi, haml ๋˜๋Š” haml-rails์—์„œ ActionView::Template::Handlers::ERB::Erubi ์˜ ์ง์ ‘์ ์ธ ์„ ์–ธ์„ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ๊ทธ๊ฒƒ์— ๋”ฐ๋ฅด๋ฉด Erubi ์˜ ๋ณต์‚ฌ๋ณธ์ด๋ฉฐ ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์ด ์—†์Šต๋‹ˆ๋‹ค.

๋‚˜๋Š” ๊ทธ๊ฒƒ์„ ์กฐ๊ธˆ ์ขํ˜”๋‹ค: ActionView::Template ์˜ ๋„ค์ž„์ŠคํŽ˜์ด์Šค ์•„๋ž˜์—์„œ ์ฐธ์กฐ๋˜๋Š” ๋ชจ๋“  ์ƒ์ˆ˜๋Š” ๋ฃจํŠธ ๋„ค์ž„์ŠคํŽ˜์ด์Šค์— ์žˆ๋Š” ๊ทธ ์ƒ์ˆ˜์— ๋Œ€ํ•œ ์ฐธ์กฐ๋ฅผ ์•ผ๊ธฐํ•œ๋‹ค:

> ActionView::Template::Erubi
(eval):1: warning: toplevel constant Erubi referenced by ActionView::Template::Erubi
> ActionView::Template::ActionView
(eval):1: warning: toplevel constant ActionView referenced by ActionView::Template::ActionView
> defined? ActionView::Template::Handlers::ERB::Erubi
=> "expression"
> defined? ActionView::Template::Handlers::ERB::sdfsdf
=> nil
> defined? ActionView::Template::Handlers::ERB::ActionView
=> "constant"

์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด #948์„ ์—ด์—ˆ์Šต๋‹ˆ๋‹ค.

์ถ”์ ํ•ด ์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ์ฆ๊ฑฐ์šด ์‹œ๊ฐ„์„ ๋ณด๋‚ด์‹  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

2017๋…„ 8์›” 8์ผ ํ™”์š”์ผ ์˜คํ›„ 2:53 Robin Daugherty [email protected]
์ผ๋‹ค:

์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด #948 https://github.com/haml/haml/pull/948 ์„ ์—ด์—ˆ์Šต๋‹ˆ๋‹ค.

โ€”
์Šค๋ ˆ๋“œ๋ฅผ ์ž‘์„ฑํ–ˆ๊ธฐ ๋•Œ๋ฌธ์— ์ด ๋ฉ”์‹œ์ง€๋ฅผ ๋ฐ›๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.
์ด ์ด๋ฉ”์ผ์— ์ง์ ‘ ๋‹ต์žฅํ•˜๊ณ  GitHub์—์„œ ํ™•์ธ
https://github.com/haml/haml/issues/946#issuecomment-321048633 ๋˜๋Š” ์Œ์†Œ๊ฑฐ
์Šค๋ ˆ๋“œ
https://github.com/notifications/unsubscribe-auth/AAAH_kM6UUUnGmpu4Q8DljFSkdD6U6PXks5sWK6ugaJpZM4OuAVp
.

์ด ๋ฌธ์ œ๋„ ์žˆ์—ˆ๊ณ  gem Better Errors๋ฅผ 2.2.0์œผ๋กœ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.
๊ทธ๋Ÿฌ๋‚˜ ์˜ค๋Š˜ ๋‚ด ์•ฑ์ด ๋™์ผํ•œ ์˜ค๋ฅ˜๋กœ ๋‹ค์‹œ ์ค‘๋‹จ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
์ด๋ฒˆ์—๋Š” i18n-tasks 0.9.17์ด ์›์ธ์ž…๋‹ˆ๋‹ค! ์ด ๋ฌธ์ œ๋ฅผ 0.9.16์œผ๋กœ ์ˆ˜์ •ํ•˜๋Š” ๊ฒƒ์ด ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค.

์ด๊ฒƒ์ด ๋ˆ„๊ตฐ๊ฐ€๋ฅผ ๋•๊ธฐ๋ฅผ ๋ฐ”๋ž๋‹ˆ๋‹ค.

Better Errors 2.2.0์—์„œ ์ž˜ ์ž‘๋™ํ•˜๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๊ฐ์‚ฌ ํ•ด์š”!

์ด ๋ฌธ์ œ์˜ ์‚ฌ๋žŒ๋“ค์ด https://github.com/haml/haml/pull/948์„ ํฌํ•จํ•˜์—ฌ Haml์˜ ์ตœ์‹  ๋งˆ์Šคํ„ฐ ๋ธŒ๋žœ์น˜๋ฅผ ํ…Œ์ŠคํŠธํ•˜๊ธฐ๋ฅผ

์ผ์ฐ ๋ณ‘ํ•ฉํ•ด์„œ ์ฃ„์†กํ•ฉ๋‹ˆ๋‹ค. https://github.com/haml/haml/pull/952๋ฅผ ํฌํ•จํ•˜์—ฌ ๋งˆ์Šคํ„ฐ๋ฅผ ์‹œ๋„ํ•ด ์ฃผ

๋‚˜๋ฅผ ์œ„ํ•ด ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค! ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.

2017๋…„ 8์›” 18์ผ(๊ธˆ) ์˜ค์ „ 12:21 Takashi Kokubun [email protected]
์ผ๋‹ค:

์ผ์ฐ ๋ณ‘ํ•ฉํ•ด์„œ ์ฃ„์†กํ•˜์ง€๋งŒ #952๋ฅผ ํฌํ•จํ•˜์—ฌ ๋งˆ์Šคํ„ฐ๋ฅผ ์‚ฌ์šฉํ•ด ์ฃผ์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ?
https://github.com/haml/haml/pull/952 ?

โ€”
์Šค๋ ˆ๋“œ๋ฅผ ์ž‘์„ฑํ–ˆ๊ธฐ ๋•Œ๋ฌธ์— ์ด ๋ฉ”์‹œ์ง€๋ฅผ ๋ฐ›๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.
์ด ์ด๋ฉ”์ผ์— ์ง์ ‘ ๋‹ต์žฅํ•˜๊ณ  GitHub์—์„œ ํ™•์ธ
https://github.com/haml/haml/issues/946#issuecomment-323255535 ๋˜๋Š” ์Œ์†Œ๊ฑฐ
์Šค๋ ˆ๋“œ
https://github.com/notifications/unsubscribe-auth/AAAH_hNER0VSgtIDqnwURHQNAMF6LfFyks5sZRFRgaJpZM4OuAVp
.

๋‚ด ํ”„๋กœ์ ํŠธ์—์„œ๋„ ์ž˜ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค. ๊ฐ์‚ฌ ํ•ด์š”!

  • ๋ฃจ๋น„ v2.4.1
  • ๋ ˆ์ผ์Šค v5.0.5
  • haml-rails v1.0.0
์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰