Open umakant-rails opened 10 years ago
Yep.. Me too. Running "rails generate ajaxful_rating User" and getting
create app/models/rate.rb
/usr/lib/ruby/gems/1.9.1/gems/ajaxful_rating-3.0.0.beta8/lib/generators/ajaxful_rating/ajaxful_rating_generator.rb:16:in create_migration': wrong number of arguments (3 for 0) (ArgumentError) from /usr/lib/ruby/gems/1.9.1/gems/railties-4.1.1/lib/rails/generators/migration.rb:63:in
migration_template'
from /usr/lib/ruby/gems/1.9.1/gems/ajaxful_rating-3.0.0.beta8/lib/generators/ajaxful_rating/ajaxful_rating_generator.rb:17:in create_migration' from /usr/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:in
run'
from /usr/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in invoke_command' from /usr/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in
block in invoke_all'
from /usr/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in each' from /usr/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in
map'
from /usr/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in invoke_all' from /usr/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/group.rb:232:in
dispatch'
from /usr/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:in start' from /usr/lib/ruby/gems/1.9.1/gems/railties-4.1.1/lib/rails/generators.rb:157:in
invoke'
from /usr/lib/ruby/gems/1.9.1/gems/railties-4.1.1/lib/rails/commands/generate.rb:11:in <top (required)>' from /usr/lib/ruby/gems/1.9.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in
require'
from /usr/lib/ruby/gems/1.9.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in block in require' from /usr/lib/ruby/gems/1.9.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in
load_dependency'
from /usr/lib/ruby/gems/1.9.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in require' from /usr/lib/ruby/gems/1.9.1/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:135:in
generate_or_destroy'
from /usr/lib/ruby/gems/1.9.1/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:51:in generate' from /usr/lib/ruby/gems/1.9.1/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:40:in
run_command!'
from /usr/lib/ruby/gems/1.9.1/gems/railties-4.1.1/lib/rails/commands.rb:17:in <top (required)>' from bin/rails:8:in
require'
from bin/rails:8:in `
did you found the solution?
I have followed to "https://github.com/edgarjs/ajaxful-rating" I have install gem and applied setting in config/development.rb "config.gem "ajaxful_rating". Finally, I execute "rails g ajaxful_rating User" where User is model name. then I have fetch follwing error:
About application's environment:
Ruby version 2.0.0 (i686-linux) RubyGems version 2.2.2 Rack version 1.5 Rails version 4.0.3 Action Pack version 4.0.3 Action Mailer version 4.0.3 Active Support version 4.0.3
home/umakant/.rvm/gems/ruby-2.0.0-p451@salon/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in'
require': /home/umakant/.rvm/gems/ruby-2.0.0-p451@salon/gems/ajaxful_rating-2.2.9.1/lib/axr/model.rb:23: syntax error, unexpected ',', expecting => (SyntaxError) /home/umakant/.rvm/gems/ruby-2.0.0-p451@salon/gems/ajaxful_rating-2.2.9.1/lib/axr/model.rb:27: syntax error, unexpected keyword_do_block, expecting keyword_end options[:dimensions].each do |dimension| ^ /home/umakant/.rvm/gems/ruby-2.0.0-p451@salon/gems/ajaxful_rating-2.2.9.1/lib/axr/model.rb:28: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '(' has_many "#{dimension}_rates", :dependent => :destroy, ^ /home/umakant/.rvm/gems/ruby-2.0.0-p451@salon/gems/ajaxful_rating-2.2.9.1/lib/axr/model.rb:28: syntax error, unexpected ',', expecting keyword_end has_many "#{dimension}_rates", :dependent => :destroy, ^ /home/umakant/.rvm/gems/ruby-2.0.0-p451@salon/gems/ajaxful_rating-2.2.9.1/lib/axr/model.rb:29: syntax error, unexpected ',', expecting keyword_end ...{:dimension => dimension.to_s}, :class_name => 'Rate', :as =... ... ^ /home/umakant/.rvm/gems/ruby-2.0.0-p451@salon/gems/ajaxful_rating-2.2.9.1/lib/axr/model.rb:29: syntax error, unexpected ',', expecting keyword_end ...n.to_s}, :class_name => 'Rate', :as => :rateable ... ^ /home/umakant/.rvm/gems/ruby-2.0.0-p451@salon/gems/ajaxful_rating-2.2.9.1/lib/axr/model.rb:277: syntax error, unexpected keyword_end, expecting end-of-input from /home/umakant/.rvm/gems/ruby-2.0.0-p451@salon/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in
block in require' from /home/umakant/.rvm/gems/ruby-2.0.0-p451@salon/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:inload_dependency' from /home/umakant/.rvm/gems/ruby-2.0.0-p451@salon/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:in
require' from /home/umakant/.rvm/gems/ruby-2.0.0-p451@salon/gems/ajaxful_rating-2.2.9.1/lib/ajaxful_rating.rb:3:in<top (required)>' from /home/umakant/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in
require' from /home/umakant/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:inblock (2 levels) in require' from /home/umakant/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in
each' from /home/umakant/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:inblock in require' from /home/umakant/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in
each' from /home/umakant/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:inrequire' from /home/umakant/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler.rb:131:in
require' from /home/umakant/rails_work/salons/config/application.rb:16:in<top (required)>' from /home/umakant/.rvm/gems/ruby-2.0.0-p451@salon/gems/railties-4.0.3/lib/rails/commands.rb:43:in
require' from /home/umakant/.rvm/gems/ruby-2.0.0-p451@salon/gems/railties-4.0.3/lib/rails/commands.rb:43:in<top (required)>' from bin/rails:4:in
require' from bin/rails:4:in `