edgarjs / ajaxful-rating

Provides a simple way to add rating functionality to your application.
http://rdoc.info/projects/edgarjs/ajaxful-rating
417 stars 127 forks source link

Error raise to exec "rails g ajaxful_rating User" #100

Open umakant-rails opened 10 years ago

umakant-rails commented 10 years ago

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:inblock in require' from /home/umakant/.rvm/gems/ruby-2.0.0-p451@salon/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in load_dependency' from /home/umakant/.rvm/gems/ruby-2.0.0-p451@salon/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:229:inrequire' 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:inrequire' from /home/umakant/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in block (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:ineach' from /home/umakant/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in block in require' from /home/umakant/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:ineach' from /home/umakant/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in require' from /home/umakant/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.5.3/lib/bundler.rb:131:inrequire' 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:inrequire' 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:inrequire' from bin/rails:4:in `

'

maximbond commented 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:inmigration_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:inrun' 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:inblock 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:inmap' 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:indispatch' 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:ininvoke' 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:inrequire' 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:inload_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:ingenerate_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:inrun_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:inrequire' from bin/rails:8:in `

'

Rui90 commented 8 years ago

did you found the solution?