向需要git url的gemspec添加gem依赖项

时间:2014-07-03 13:11:11

标签: ruby-on-rails git rails-engines

我希望为我正在创建的引擎添加gem依赖项。我尝试添加它的方式与我在Gemfile中添加它的方式相同,但它似乎不起作用。我如何在.gemspec

中添加它

宝石我想添加

  s.add_dependency 'activerecord-sqlserver-adapter', git: "https://github.com/rails-sqlserver/activerecord-sqlserver-adapter"

我收到错误

Illformed requirement [{:git=>"https://github.com/rails-sqlserver/activerecord-sqlserver-adapter"}] from
/Users/lovell/rails/my_engine/my_engine.gemspec:25:in `block in <main>'

1 个答案:

答案 0 :(得分:1)

我想你可能会失去运气;您可以在Gemfile comes from Bundler, and isn't supported in "native" RubyGems中设置的:git属性。由于RubyGems不支持,因此您无法从Gemspec中获取此信息。