DEV Community

Nitin Reddy
Nitin Reddy

Posted on

Workaround for "rails g scaffold" hangs

If you are running a "rails g scaffold ..." and have the command hanging with no visible sign of activity, Spring is likely playing havoc.

Rails Spring is a preloader for the Rails framework. If you execute a "spring stop" and re-run the scaffold command, it should work. However, having to stop Spring after every command is going to get aggravating so there's an environment variable you can set - DISABLE_SPRING.

Run "spring stop" (if it is already running) and then define the DISABLE_SPRING variable like this on a bash prompt:
export DISABLE_SPRING=true

Top comments (1)

Collapse
 
pa671 profile image
pa671

Thank you guys