user2290319
user2290319

Reputation: 1

How do I use a RubyGem I made in Rails?

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

Answers (1)

user944938
user944938

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

Related Questions