rails destroy controller does nothing


I was trying to delete (and then re-generate) the welcome controller in my rails Project. Since I misspelled some things and now nothing is working correctly (I am learning Rails right now)

So I ran

rails destroy controller welcome

But now nothing happens…

I’ve been waiting for over ten minutes for something to happen, but nothing…

No errors or any messages

And my project is as small as it could be …

Any ideas on what I could do? Besides from trashing everything and starting form scratch again?


I fixed my initial problem and my project works again, but being able to delete controllers is something that I would like to be able to.


If you able to learn about how Rails’s generate files for you, you can remove them manually without commands. I know commands are something magic that newcomers love, but understanding what the command does also a good way to learn Rails.
that was/is my problem I don’t know what the magical rails commands do (yet) So I was hoping to use another command, so I don’t forget something and screw up even more 😉
– NIoSaT
1 hour ago



Try to remove routes manually and retry deleting with

rails d controller welcome -p

-p will post output to terminal. Check it for errors. If there are any errors, update answer with information about them. And if no errors are shown, try command again without -p.

Here is a post with lots of comments and answers about this command.


how can I delete the routes manually in general? Editing the routes.rb file? When I look into this file I see some routes that I put there, but rails routes gives me even more routes for my other controller/model
– NIoSaT
1 hour ago
Yes, just remove all strings with welcome from routes.rb
Ok I will try this later, now I have to fix some other problems right now …
– NIoSaT
41 mins ago
I did not delete the routes, but now the rails d controller welcome -p displays something – so I guess it works now again thanks for the help
– NIoSaT
18 mins ago



Add a Comment