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

Problem in using "rails g ajaxful_rating UserModelName" i.e while linking rate and user model #85

Closed mayurkhatri closed 12 years ago

mayurkhatri commented 12 years ago

Hi, I am using rails 3.2.2, ruby 1.9.2-p320 and ajaxful_rating '2.2.9.1'. I am using devise. user is a devise generated model

While i am running the line "rails g ajaxful_rating UserModelName", I get the following error on my console.

/Users/mayur/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:in require': /Users/mayur/.rvm/gems/ruby-1.9.2-p320/gems/ajaxful_rating-2.2.9.1/lib/axr/model.rb:23: syntax error, unexpected ',', expecting tASSOC (SyntaxError) /Users/mayur/.rvm/gems/ruby-1.9.2-p320/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| ^ /Users/mayur/.rvm/gems/ruby-1.9.2-p320/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, ^ /Users/mayur/.rvm/gems/ruby-1.9.2-p320/gems/ajaxful_rating-2.2.9.1/lib/axr/model.rb:28: syntax error, unexpected ',', expecting keyword_end has_many "#{dimension}_rates", :dependent => :destroy, ^ /Users/mayur/.rvm/gems/ruby-1.9.2-p320/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 =... ... ^ /Users/mayur/.rvm/gems/ruby-1.9.2-p320/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 ... ^ /Users/mayur/.rvm/gems/ruby-1.9.2-p320/gems/ajaxful_rating-2.2.9.1/lib/axr/model.rb:93: syntax error, unexpected keyword_do_block, expecting keyword_end ...esent? or (v == false) }.map do |k, v| ... ^ /Users/mayur/.rvm/gems/ruby-1.9.2-p320/gems/ajaxful_rating-2.2.9.1/lib/axr/model.rb:93: syntax error, unexpected '|', expecting '=' /Users/mayur/.rvm/gems/ruby-1.9.2-p320/gems/ajaxful_rating-2.2.9.1/lib/axr/model.rb:192: syntax error, unexpected keyword_end, expecting $end from /Users/mayur/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:inblock in require' from /Users/mayur/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:236:in load_dependency' from /Users/mayur/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:251:inrequire' from /Users/mayur/.rvm/gems/ruby-1.9.2-p320/gems/ajaxful_rating-2.2.9.1/lib/ajaxful_rating.rb:3:in <top (required)>' from /Users/mayur/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:inrequire' from /Users/mayur/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in block (2 levels) in require' from /Users/mayur/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:ineach' from /Users/mayur/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in block in require' from /Users/mayur/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:ineach' from /Users/mayur/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in require' from /Users/mayur/.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.1.4/lib/bundler.rb:119:inrequire' from /Users/mayur/my_projects/imageuploader/config/application.rb:7:in <top (required)>' from /Users/mayur/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.2/lib/rails/commands.rb:24:inrequire' from /Users/mayur/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.2/lib/rails/commands.rb:24:in <top (required)>' from script/rails:6:inrequire'

from script/rails:6:in `
'

Please help Thanks

mayurkhatri commented 12 years ago

Problem solved.Use 'ajaxful_rating', '3.0.0.beta8'. First uninstalled the gem and again installed the updated version.

mahhektahirkhan commented 11 years ago

"Problem solved.Use
gem 'ajaxful_rating', '3.0.0.beta8' First uninstalled the gem and again installed the updated version.

great solved my issue too. Thanx.