Search code examples
jqueryruby-on-rails-3rubygemsbundlerrating

Can't get ajaxful-rating-jquery to work with rails 3


I'm trying to use the rails3 branch of ajaxful_rating_jquery but I can't get past bundle install. This is my Gemfile:

gem 'ajaxful_rating_jquery', :git => "git://github.com/kamui/ajaxful_rating_jquery.git", :branch => 'rails3'

but bundle install gives me this error:

Fetching source index for http://rubygems.org/
Could not find gem 'ajaxful_rating_jquery (>= 0)' in   
git://github.com/kamui/ajaxful_rating_jquery.git (at rails3).
Source does not contain any versions of 'ajaxful_rating_jquery (>= 0)'

I've had this problem before with a different gem and still don't know how to get around it.


Solution

  • Turns out the rails3 branch of the original ajaxful_rating gem works with either jQuery or Prototype.

    This worked for me:

    #Gemfile
    gem 'ajaxful_rating', :git => 'git://github.com/edgarjs/ajaxful-rating.git', :branch => "rails3"
    
    
    #config/routes.rb
    resources :modelname do
      member do
        post :rate
      end
    end