We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm in the process of integrating devise_token_audh (0.1.36) with devise (3.5.2) and jsonapi-resources (0.6.0). Ruby is 2.1.5, Rails 4.2.4.
I'm adding the new columns using the following migration because I have already a User table (and the setup generator does not repect this):
class DeviseTokenAuthCreateUsers < ActiveRecord::Migration def change add_column :users, :provider, :string, :null => false, :default => "email" add_column :users, :uid, :string, :null => false, :default => "" add_column :users, :confirmation_token, :string add_column :users, :confirmed_at, :datetime add_column :users, :confirmation_sent_at, :datetime add_column :users, :unconfirmed_email, :string add_column :users, :name, :string add_column :users, :nickname, :string add_column :users, :image, :string add_column :users, :tokens, :text add_index :users, [:uid, :provider], :unique => true add_index :users, :confirmation_token, :unique => true end end
My routes.rb contain:
Rails.application.routes.draw do devise_for :users namespace :api do namespace :v1 do mount_devise_token_auth_for 'User', at: 'auth' jsonapi_resources :needs jsonapi_resources :volunteerings end end ...
The User model is
class User < ActiveRecord::Base devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable :confirmable, :omniauthable include DeviseTokenAuth::Concerns::User ...
Migrating the database fails on me with
rake aborted! NoMethodError: undefined method `new' for DeviseTokenAuth:Module /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:775:in `load_migration' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:770:in `migration' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:765:in `disable_ddl_transaction' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:1048:in `use_transaction?' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:958:in `rescue in block in migrate' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:955:in `block in migrate' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:952:in `each' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:952:in `migrate' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:820:in `up' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:798:in `migrate' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/tasks/database_tasks.rb:137:in `migrate' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>' /home/stefan/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval' /home/stefan/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>' NoMethodError: undefined method `new' for DeviseTokenAuth:Module /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:775:in `load_migration' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:770:in `migration' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:765:in `disable_ddl_transaction' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:1048:in `use_transaction?' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:1040:in `ddl_transaction' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:994:in `execute_migration_in_transaction' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:956:in `block in migrate' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:952:in `each' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:952:in `migrate' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:820:in `up' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/migration.rb:798:in `migrate' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/tasks/database_tasks.rb:137:in `migrate' /home/stefan/.rvm/gems/ruby-2.1.5/gems/activerecord-4.2.4/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>' /home/stefan/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval' /home/stefan/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>' Tasks: TOP => db:migrate
Any ideas what I might be doing wrong?
The text was updated successfully, but these errors were encountered:
Also empty migration fails, even when I remove concern from model and controller and route.
Sorry, something went wrong.
I'm such an idiot. I changed the migration file name, but not the class name.
No branches or pull requests
I'm in the process of integrating devise_token_audh (0.1.36) with devise (3.5.2) and jsonapi-resources (0.6.0). Ruby is 2.1.5, Rails 4.2.4.
I'm adding the new columns using the following migration because I have already a User table (and the setup generator does not repect this):
My routes.rb contain:
The User model is
Migrating the database fails on me with
Any ideas what I might be doing wrong?
The text was updated successfully, but these errors were encountered: