Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

[0.4.6] scaffold_generator.rb:85:in `create_migration': wrong number of arguments (given 3, expected 0) (ArgumentError) #169

Open
palladius opened this issue Feb 7, 2018 · 2 comments

Comments

@palladius
Copy link

$ rails g nifty:scaffold PastaRecipe name:string index new
Running via Spring preloader in process 498
create app/models/pasta_recipe.rb
create test/unit/pasta_recipe_test.rb
create test/fixtures/pasta_recipes.yml
/home/riccardo/.rvm/gems/ruby-2.2.6/gems/nifty-generators-0.4.6/lib/generators/nifty/scaffold/scaffold_generator.rb:85:in create_migration': wrong number of arguments (given 3, expected 0) (ArgumentError) from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/railties-5.1.4/lib/rails/generators/migration.rb:63:in migration_template'
from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/nifty-generators-0.4.6/lib/generators/nifty/scaffold/scaffold_generator.rb:87:in create_migration' from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/thor-0.20.0/lib/thor/invocation.rb:126:in invoke_command' from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/thor-0.20.0/lib/thor/invocation.rb:133:in block in invoke_all'
from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/thor-0.20.0/lib/thor/invocation.rb:133:in each' from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/thor-0.20.0/lib/thor/invocation.rb:133:in map'
from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/thor-0.20.0/lib/thor/invocation.rb:133:in invoke_all' from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/thor-0.20.0/lib/thor/group.rb:232:in dispatch'
from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/thor-0.20.0/lib/thor/base.rb:466:in start' from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/railties-5.1.4/lib/rails/generators.rb:269:in invoke'
from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/railties-5.1.4/lib/rails/commands/generate/generate_command.rb:24:in perform' from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/thor-0.20.0/lib/thor/invocation.rb:126:in invoke_command' from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/thor-0.20.0/lib/thor.rb:387:in dispatch'
from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/railties-5.1.4/lib/rails/command/base.rb:63:in perform' from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/railties-5.1.4/lib/rails/command.rb:44:in invoke'
from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/railties-5.1.4/lib/rails/commands.rb:16:in <top (required)>' from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in require'
from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in block in require' from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in load_dependency'
from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in require' from /home/riccardo/git/ror5-pasta/pasta/bin/rails:9:in <top (required)>'
from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in load' from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in block in load'
from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in load_dependency' from /home/riccardo/.rvm/gems/ruby-2.2.6/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in load'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
from -e:1:in `

'

rails version: 5.1.4
ruby -v: 2.3.1p112
nifty-generators (0.4.6)

@palladius
Copy link
Author

PS Ryan JFYI I'm a huge fan and I couldn't start vanilla projects without your generators.

I've also found another link by googling around where a guy says that renaming "create_migration" fixes it: muratguzel/letsrate#76

Not sure, honestly I didnt try.

@palladius
Copy link
Author

Yup - renaming on line 85 "create_migration" to "create_ryanbates_migration" fixes it, in: /home/riccardo/.rvm/gems/ruby-2.2.6/gems/nifty-generators-0.4.6/lib/generators/nifty/scaffold/scaffold_generator.rb ⭕

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant