Reputation: 1
I recently developed a simple RubyGem and deployed it to RubyGems.org. How do I use this RubyGem within a Rails application? Here is the code to the Gem
module Gem1
class Message
def self.gem?
puts "Hi This is a RubyGem"
end
end
end
Upvotes: 0
Views: 46
Reputation: 1020
You can specify the gem in your Gemfile and do a bundle install. Typically can be done
gem 'nokogiri'
in your Gemfile and run bundle install
.
once the gem is installed you can access it across your application
Upvotes: 1