Rails Generate Devise:Controllers not Working
SOLVED
I've just created the controller manually and make it inherit from Devise. For example:
class Users::RegistrationsController < Devise::RegistrationsController
# Override the action you want here.
end
This controller should live in app/controllers/users/registrations_controller.rb. If you have any other scope just go with app/controllers/scope/registrations_controller.rb. For example if you have an admin scope it would be app/controllers/admins/registrations_controller.rb.
Best.
UPDATE
Following the comment from blushrt, I forgot to mention that it is important to modify config/routes.rb to make Devise use the created controller for the specific resource. For example, for users, you should put in your config/routes.rb:
devise_for :users, controllers: { registrations: "users/registrations" }
That's it. Best.
Can't generate controllers
The answer was to re-install the entire rails suite and ruby... Tedious but it fixed the issue.
Related Topics
Script to Run Against Stdin If No Arg; Otherwise Input File =Argv[0]
What Are the Steps Needed to Create and Publish a Rubygem of Your Own
Rails: Wkhtmltopdf Runtimeerror (Location of Wkhtmltopdf Unknown)
Save Image with Mechanize and Nokogiri
Grouped Collection Select Alphabetical Order Rails
Why Is Uri.Escape() Marked as Obsolete and Where Is This Regexp::Unsafe Constant
Calling a Sinatra App Instance Method from Testcase
Rails 4.0.3 Generating Incorrect Asset Paths with Asset_Sync
How to Extend Redcarpet to Support Auto Linking User Mentions
Sorting a Hash in Ruby by Its Value First Then Its Key
Ruby Scope of Data After _End_
How to Use Regex for Utf8 in Ruby