Fault tolerant rails

I start with rails and devise and going through railscasts instead of doing rails generate devise:views , I did rails generate devise views , which causes me some headaches - I would like to undo this, unfortunately, $ rails destroy devise views produces errors, so I really don't 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:in each '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:in in '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:in routes' 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:in initialize 'from / usr / local / lib / ruby ​​/ gems / 1.9.1 / gems / devise-1.5.1 / lib / devise.rb: 2 91: in new' from /usr/local/lib/ruby/gems/1.9.1/gems/devise-1.5.1/lib/devise.rb:291:in add_mapping' from / usr / local / lib / ruby ​​/ gems / 1.9.1 / gems / devise -

any ideas how i can push this back?

+7
source share
4 answers

rails destroy devise views - convenient generate call

+10
source

Just delete the views/devise .

+4
source

The syntax is incorrect, you just need to:

 rails destroy devise:views 

if you want to destroy a specific set of views, use:

 rails destroy devise:views model 

instead of the model, use the name of the model you want to destroy, for example, the user or administrator, depending on your model.

+4
source

Just delete the "rails destroy devise views" in the routes.rb file

0
source

All Articles