Reputation: 7409
I want to specify the 2 gems in Gemfile,
- activeadmin-dragonfly (0.0.2 89a47f9)
- activeadmin-wysihtml5 (1.0.0 35d1a94)
How could I do ?
This is my idea
gem 'activeadmin-dragonfly', github: 'stefanoverna/activeadmin-dragonfly' '~> 0.0.2 89a47f9'
Upvotes: 0
Views: 65
Reputation: 1085
Hope you are okay ... I just read your question , and this is what helped me in my case ...
source 'https://rubygems.org' # SSL Connection for downloading gems
# This is the start of the gem lists
gem 'gem-file-name' , 'specific gem version'
gem 'gem-file-name' , '=> gem-version'
gem 'gem-file-name' , '~> gem-version'
You can get only the specific gem with the first one , where the last one gets you the beta versions too ... Or if you want to have it with git repo then you can ...
gem 'Gem Name', :git => 'https://github.com/Username/filename.git'
Or to get multiple gem from Git Repo
git 'https://github.com/rails/rails.git' do
gem 'railties'
gem 'action_pack'
gem 'active_model'
end
More data in http://bundler.io/v1.9/git.html
Hope this will solve your problem...
Upvotes: 0
Reputation: 286
You can specify version of one gem from github by adding this:
gem 'gem_name', github: 'author/repository_name', ref: 'ref', tag: 'tag'
In your case:
gem 'activeadmin-dragonfly', github: 'stefanoverna/activeadmin-dragonfly', ref: '89a47f9'
Reference: http://bundler.io/v1.9/git.html
Upvotes: 2