2

While am trying to create a scaffold rails g nifty:scaffold authentication user_id:integer provider:string uid:string index create destroy

authentication.rb was generated but no views I am getting error as /home/user/.rvm/gems/ruby-2.1.0/gems/nifty-generators-0.4.6/lib/generators/nifty/scaffold/scaffold_generator.rb:85:in create_migration': wrong number of arguments (3 for 0) (ArgumentError) from /home/user/.rvm/gems/ruby-2.1.0/gems/railties-4.1.2.rc1/lib/rails/generators/migration.rb:63:inmigration_template' from /home/user/.rvm/gems/ruby-2.1.0/gems/nifty-generators-0.4.6/lib/generators/nifty/scaffold/scaffold_generator.rb:87:in create_migration' from /home/user/.rvm/gems/ruby-2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:inrun' from /home/user/.rvm/gems/ruby-2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in invoke_command' from /home/user/.rvm/gems/ruby-2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:inblock in invoke_all' from /home/user/.rvm/gems/ruby-2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in each' from /home/user/.rvm/gems/ruby-2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:inmap' from /home/user/.rvm/gems/ruby-2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in invoke_all' from /home/user/.rvm/gems/ruby-2.1.0/gems/thor-0.19.1/lib/thor/group.rb:232:indispatch' from /home/user/.rvm/gems/ruby-2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in start' from /home/user/.rvm/gems/ruby-2.1.0/gems/railties-4.1.2.rc1/lib/rails/generators.rb:157:ininvoke' from /home/user/.rvm/gems/ruby-2.1.0/gems/railties-4.1.2.rc1/lib/rails/commands/generate.rb:11:in <top (required)>' from /home/user/.rvm/gems/ruby-2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:inrequire' from /home/user/.rvm/gems/ruby-2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in block in require' from /home/user/.rvm/gems/ruby-2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:232:inload_dependency' from /home/user/.rvm/gems/ruby-2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in require' from /home/user/.rvm/gems/ruby-2.1.0/gems/railties-4.1.2.rc1/lib/rails/commands/commands_tasks.rb:135:ingenerate_or_destroy' from /home/user/.rvm/gems/ruby-2.1.0/gems/railties-4.1.2.rc1/lib/rails/commands/commands_tasks.rb:51:in generate' from /home/user/.rvm/gems/ruby-2.1.0/gems/railties-4.1.2.rc1/lib/rails/commands/commands_tasks.rb:40:inrun_command!' from /home/user/.rvm/gems/ruby-2.1.0/gems/railties-4.1.2.rc1/lib/rails/commands.rb:17:in <top (required)>' from /home/user/.rvm/gems/ruby-2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:inrequire' from /home/user/.rvm/gems/ruby-2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in block in require' from /home/user/.rvm/gems/ruby-2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:232:inload_dependency' from /home/user/.rvm/gems/ruby-2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in require' from /home/user/Desktop/remake/bin/rails:8:in' from /home/user/.rvm/gems/ruby-2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:241:in load' from /home/user/.rvm/gems/ruby-2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:241:inblock in load' from /home/user/.rvm/gems/ruby-2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:232:in load_dependency' from /home/user/.rvm/gems/ruby-2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:241:inload' from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in require' from /home/user/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from -e:1:in `'

1 Answers1

3

Nifty generators havn't been updated since oct 2012 (from the github page). Use something different, because this gem is definitely not up-to-date.

Ven
  • 19,015
  • 2
  • 41
  • 61
  • which gem is better for authentication? i want to use registrations of facebook and normal using omniauth and devise at same time – user3710415 Jun 20 '14 at 10:22
  • @user3710415 As you said devise and omniauth will suit your needs – Mandeep Jun 20 '14 at 10:28
  • i want to use both of them in same table – user3710415 Jun 20 '14 at 10:41
  • @user3710415 use devise to generate users table then create a migration to add uid, provider. For devise refer [here](https://github.com/plataformatec/devise) and for facebook example check [this](https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview) – Mandeep Jun 20 '14 at 10:50
  • I want to save both registrations in same table I am new to ror So could you please eloborate – user3710415 Jun 20 '14 at 11:34
  • 1
    @user3710415 I don't think it's a right place to elaborate on things. To give you a head start you'll have to install devise in your app and then `rails generate devise:install` `rails generate devise MODEL` and then follow the steps given in links. :) Try out things yourself that's how you'll learn and if you have any errors you can post them as questions. :) – Mandeep Jun 20 '14 at 11:56