haml / haml-rails

let your Gemfile do the talking
MIT License
1.04k stars 169 forks source link

erb2haml converter halts install when using a rails template setup file #107

Open hmistry opened 8 years ago

hmistry commented 8 years ago

I use a rails template (rails -m option) with my commonly used gems to quickly create a new project. I found the prompt to delete the old html files when running rails haml:erb2haml caused the script to halt. Thought you'd like to know.

crawfoal commented 7 years ago

It halts, like it is waiting for you to tell it what to do (answer y/n), or it hangs erroneously?

In my template, I've never had the haml:erb2haml task hang erroneously, it just stops and waits for me to answer yes or no. How are you running the task? I run it via the rake method (a part of the Rails Templates API, but not documented anymore).

Also, this might not be related, but I've had a similar problem with generate 'rspec:install', and I've found it doesn't hang if I stop spring first (run 'spring stop'). The generate command uses rails instead of rake, which is why I'm thinking it could be related.

ksouthworth commented 5 years ago

I'm having this issue as well, running inside a rails application template (Thor action) when executing via:

HAML_RAILS_DELETE_ERB=true rails haml:erb2haml

I still get prompted:

Would you like to delete the original .erb files? (This is not recommended unless you are under version control.) (y/n)

and I have to type the y and press Enter to continue the rails template execution