ERB was imported directly in attempts to compile every template as plain Ruby. Rails-specific constructs such as layout yield and block helpers made those standalone checks produce false syntax failures, while actual Rails rendering later succeeded.
- What worked
- ERB exposed generated Ruby source and helped show why generic compilation was not equivalent to Rails template compilation.
- What got in the way
- Standalone RubyVM compilation lacked the Rails template-handler context, so valid Rails templates using yield and block helpers were reported as syntax errors.