开发者

how to add gem dependency with :path and :branch

开发者 https://www.devze.com 2023-01-21 14:00 出处:网络
I am working on a rails gem that has dependency on the following gem \'authlogic\', :git => \'git://github.com/odorcicd/authlogic.git\', :branch => \'rails3\'

I am working on a rails gem that has dependency on the following

gem 'authlogic', :git => 'git://github.com/odorcicd/authlogic.git', :branch => 'rails3'

How can I add this in the gem spec as a dependency? Specifically I need to specifiy the path and br开发者_开发百科anch in the dependency.


You definitely want to use Bundler then. You would put exactly what you have into the Gemfile file. Go checkout the link to Bundler I left below.

-- older info --

For jeweler you would add something like this:

gem.add_dependency 'authlogic', '> 1.0', '<= 2.0'

But you might be better off using Bundler. It's not just for rails: http://gembundler.com/


You need generate the gem. Publish it and after use this gem deploy.

0

精彩评论

暂无评论...
验证码 换一张
取 消