【问题标题】:Rails | installing country_select gem导轨 |安装 country_select gem
【发布时间】:2011-05-07 13:32:54
【问题描述】:

我在我的 rails 应用程序中设置 gem 时遇到问题。我正在执行以下操作:

gem 'country_select', :git => 'git://github.com/rails/country_select.git'

尝试使用此处找到的宝石:

https://github.com/rails/country_select

我收到以下错误:

Could not find gem 'country_select (>= 0, runtime)' in git://github.com/rails/country_select.git (at master).
Source does not contain any versions of 'country_select (>= 0, runtime)'

【问题讨论】:

标签: ruby-on-rails rubygems github gem


【解决方案1】:

它不是作为 gem 安装的,因为它不是 gem,而是一个插件。

以下是 Rails 的安装方向

Rails3

rails plugin install https://github.com/rails/country_select.git

Rails2

ruby script/plugin install https://github.com/rails/country_select.git

【讨论】:

  • Rails 4 将不再支持插件,现在最好使用 gem。
【解决方案2】:

我只是forked and gemified这个插件,如果它对你有用的话。

# Gemfile
gem "country-select"

【讨论】:

  • 不错!一个答案加上一个资源。
  • 截至本评论日期,gem 会定期更新。使用它而不是插件。
猜你喜欢
  • 2012-11-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-08-22
  • 2015-11-05
  • 1970-01-01
相关资源
最近更新 更多