When Haml is selected, installation script breaks while creating views
timoh opened this issue · comments
With the command rails new startupff -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb -T -O
I get the following errors:
run git add -A from "."
run git commit -qm "rails_apps_composer: controllers" from "."
views recipe running after 'bundle install'
remove app/views/home/index.html.erb
remove app/views/home/index.html.haml
# ERROR: (string):3 :: parse error on value "$end" ($end)
# ERROR: (string):3 :: parse error on value "$end" ($end)
# ERROR: (string):2 :: parse error on value "$end" ($end)
# ERROR: (string):2 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):2 :: parse error on value "@users" (tIVAR)
# ERROR: (string):2 :: parse error on value "@users" (tIVAR)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):3 :: parse error on value ["end", 3] (kEND)
# ERROR: (string):3 :: parse error on value ["end", 3] (kEND)
# ERROR: (string):3 :: parse error on value ["end", 3] (kEND)
# ERROR: (string):3 :: parse error on value ["end", 3] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
create app/views/home/index.html.haml
remove app/views/users/index.html.erb
remove app/views/users/index.html.haml
# ERROR: (string):3 :: parse error on value "$end" ($end)
# ERROR: (string):3 :: parse error on value "$end" ($end)
# ERROR: (string):2 :: parse error on value "$end" ($end)
# ERROR: (string):2 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):2 :: parse error on value "@users" (tIVAR)
# ERROR: (string):2 :: parse error on value "@users" (tIVAR)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):4 :: parse error on value ["end", 4] (kEND)
# ERROR: (string):4 :: parse error on value ["end", 4] (kEND)
# ERROR: (string):4 :: parse error on value ["end", 4] (kEND)
# ERROR: (string):4 :: parse error on value ["end", 4] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
create app/views/users/index.html.haml
remove app/views/users/show.html.erb
remove app/views/users/show.html.haml
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
create app/views/users/show.html.haml
remove app/views/users/edit.html.erb
remove app/views/users/edit.html.haml
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):4 :: parse error on value ["end", 4] (kEND)
# ERROR: (string):4 :: parse error on value ["end", 4] (kEND)
# ERROR: (string):4 :: parse error on value ["end", 4] (kEND)
# ERROR: (string):4 :: parse error on value ["end", 4] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
create app/views/users/edit.html.haml
run git add -A from "."
run git commit -qm "rails_apps_composer: views" from "."
routes recipe running after 'bundle install'
remove config/routes.rb
create config/routes.rb
gsub config/routes.rb
run git add -A from "."
run git commit -qm "rails_apps_composer: routes" from "."
frontend recipe running after 'bundle install'
remove app/views/layouts/application.html.erb
remove app/views/layouts/application.html.haml
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
create app/views/layouts/application.html.haml
remove app/views/layouts/_messages.html.erb
remove app/views/layouts/_messages.html.haml
# ERROR: (string):3 :: parse error on value "$end" ($end)
# ERROR: (string):3 :: parse error on value "$end" ($end)
# ERROR: (string):2 :: parse error on value "$end" ($end)
# ERROR: (string):2 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):2 :: parse error on value "flash" (tIDENTIFIER)
# ERROR: (string):2 :: parse error on value "flash" (tIDENTIFIER)
# ERROR: (string):3 :: parse error on value "$end" ($end)
# ERROR: (string):3 :: parse error on value "$end" ($end)
# ERROR: (string):2 :: parse error on value "$end" ($end)
# ERROR: (string):2 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):2 :: parse error on value ["if", 2] (kIF)
# ERROR: (string):2 :: parse error on value ["if", 2] (kIF)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):4 :: parse error on value ["end", 4] (kEND)
# ERROR: (string):4 :: parse error on value ["end", 4] (kEND)
# ERROR: (string):4 :: parse error on value ["end", 4] (kEND)
# ERROR: (string):4 :: parse error on value ["end", 4] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):3 :: parse error on value ["end", 3] (kEND)
# ERROR: (string):3 :: parse error on value ["end", 3] (kEND)
# ERROR: (string):3 :: parse error on value ["end", 3] (kEND)
# ERROR: (string):3 :: parse error on value ["end", 3] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
create app/views/layouts/_messages.html.haml
remove app/views/layouts/_navigation.html.erb
remove app/views/layouts/_navigation.html.haml
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
create app/views/layouts/_navigation.html.haml
remove app/views/layouts/_navigation.html.erb
remove app/views/layouts/_navigation.html.haml
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):3 :: parse error on value "$end" ($end)
# ERROR: (string):3 :: parse error on value "$end" ($end)
# ERROR: (string):2 :: parse error on value "$end" ($end)
# ERROR: (string):2 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):4 :: parse error on value "$end" ($end)
# ERROR: (string):2 :: parse error on value ["if", 2] (kIF)
# ERROR: (string):2 :: parse error on value ["if", 2] (kIF)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):3 :: parse error on value "$end" ($end)
# ERROR: (string):3 :: parse error on value "$end" ($end)
# ERROR: (string):1 :: parse error on value ["else", 1] (kELSE)
# ERROR: (string):1 :: parse error on value ["else", 1] (kELSE)
# ERROR: (string):1 :: parse error on value ["else", 1] (kELSE)
# ERROR: (string):1 :: parse error on value ["else", 1] (kELSE)
# ERROR: (string):1 :: parse error on value ["else", 1] (kELSE)
# ERROR: (string):1 :: parse error on value ["else", 1] (kELSE)
# ERROR: (string):1 :: parse error on value ["else", 1] (kELSE)
# ERROR: (string):1 :: parse error on value ["else", 1] (kELSE)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):2 :: parse error on value ["when", 2] (kWHEN)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):1 :: parse error on value ["end", 1] (kEND)
# ERROR: (string):4 :: parse error on value ["end", 4] (kEND)
# ERROR: (string):4 :: parse error on value ["end", 4] (kEND)
# ERROR: (string):4 :: parse error on value ["end", 4] (kEND)
# ERROR: (string):4 :: parse error on value ["end", 4] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
# ERROR: (string):2 :: parse error on value ["end", 2] (kEND)
create app/views/layouts/_navigation.html.haml
gsub app/views/layouts/application.html.haml
gsub app/views/layouts/_navigation.html.haml
remove app/assets/stylesheets/application.css.scss
create app/assets/stylesheets/application.css.scss
remove app/assets/stylesheets/application.css
run git add -A from "."
run git commit -qm "rails_apps_composer: front-end framework" from "."
composer Running 'after everything' callbacks.
I've reproduced the error but don't have a fix. The failure occurs when converting ERB files to Haml. The code was working fine. The only change I can identify is the new version of the ruby_parser gem which was released yesterday. Html2haml uses the ruby_parser. Presumably the new ruby_parser is broken but I haven't confirmed that.
As a workaround, choose ERB not Haml, and convert views to Haml manually.
Resolved with the newest release of rails_apps_composer.