无法让 ajaxful- rating-jquery 与 Rails 3 一起使用

发布于 2024-11-14 17:08:59 字数 671 浏览 4 评论 0原文

我正在尝试使用 ajaxful_空间_jquery 的rails3分支,但我无法通过<代码>捆绑安装。这是我的 Gemfile:

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

但是 bundle install 给了我这个错误:

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)'

我之前在使用不同的 gem 时遇到过这个问题,但仍然不知道如何解决它。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

锦上情书 2024-11-21 17:08:59

事实证明,原始 ajaxful_ rating gem 的 Rails3 分支可以与 jQuery 或 Prototype 配合使用。

这对我有用:

#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

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
西瓜 2024-11-21 17:08:59

我认为你试图找回错误的宝石。尝试:

gem 'ajaxful_rating', :git => "git://github.com/edgarjs/ajaxful-rating.git", :branch => 'rails3'

I think you're trying to retrieve the wrong gem. Try:

gem 'ajaxful_rating', :git => "git://github.com/edgarjs/ajaxful-rating.git", :branch => 'rails3'
行雁书 2024-11-21 17:08:59

如果您想为 Rails 3.1 及更高版本的应用程序添加评级功能,您可以检查名为 letsrate 的新 gem。

If you want to add rating capability for you rails 3.1 and higher application you can check the new gem called letsrate.

初熏 2024-11-21 17:08:59

由于代理问题,我现在无法轻松测试这一点,但在我看来,好像 gemspec 文件在 Rails 3 分支中命名错误。

它称为 ajaxful_ rating.gemspec,捆绑器将寻找 ajaxful_ rating_jquery.gemspec。

也许尝试分叉该项目并更改 gemspec 名称?

I can't test this easily right now due to proxy problems, but it looks to me as though the gemspec file is named wrongly in the Rails 3 branch.

It's called ajaxful_rating.gemspec and bundler will be looking for ajaxful_rating_jquery.gemspec.

Try forking the project and changing the gemspec name, perhaps?

深海不蓝 2024-11-21 17:08:59

这是一个猜测,因为我无法在当前的比较中对此进行测试,但看起来宝石本身的要求与您所引入的要求不同。射击:

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

This is a guess, since I'm not able to test this at my current comp, but it looks like the require is different on the gem itself, than what you're pulling in. Give this a shot:

gem 'ajaxful_rating_jquery', 
  :git => "git://github.com/kamui/ajaxful_rating_jquery.git", 
  :branch => "rails3",
  :require => "ajaxful_rating"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文