Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undoing rails generate devise views

i am starting out with rails and devise and while going through the railscasts instead of doing rails generate devise:views i did rails generate devise views which is causing me a few headaches - i'd like to undo this unfortunately $ rails destroy devise views produces errors so i don't really know how to rollback:

/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/inflector/methods.rb:124:in block in constantize': uninitialized constant View (NameError) from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/inflector/methods.rb:123:ineach' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.9/lib/active_support/inflector/methods.rb:123:in constantize' from /usr/local/lib/ruby/gems/1.9.1/gems/devise-1.5.1/lib/devise/mapping.rb:80:into' from /usr/local/lib/ruby/gems/1.9.1/gems/devise-1.5.1/lib/devise/mapping.rb:75:in modules' from /usr/local/lib/ruby/gems/1.9.1/gems/devise-1.5.1/lib/devise/mapping.rb:92:inroutes' from /usr/local/lib/ruby/gems/1.9.1/gems/devise-1.5.1/lib/devise/mapping.rb:159:in default_used_route' from /usr/local/lib/ruby/gems/1.9.1/gems/devise-1.5.1/lib/devise/mapping.rb:69:ininitialize' from /usr/local/lib/ruby/gems/1.9.1/gems/devise-1.5.1/lib/devise.rb:291:in new' from /usr/local/lib/ruby/gems/1.9.1/gems/devise-1.5.1/lib/devise.rb:291:inadd_mapping' from /usr/local/lib/ruby/gems/1.9.1/gems/devise-

any ideas how i can roll this back?

like image 232
toast Avatar asked Nov 24 '11 12:11

toast


2 Answers

Just delete the views/devise folder.

like image 61
nathanvda Avatar answered Oct 18 '22 13:10

nathanvda


the sintaxis is wrong, you just need this:

rails destroy devise:views

if you want to destroy an especific set of views use:

rails destroy devise:views model

instead of model use the name of the model you want to destroy, for example user, or admin whichever your model is.

like image 44
Asaf Lopez Avatar answered Oct 18 '22 12:10

Asaf Lopez