Create a rails gem

Choose a name for your gem :D. In this example, I named my gem is fastfood

Create skeleton:

|  |__fastfood.rb
|  |__fastfood
|     |__engine.rb
      |  |__ff.js

// fastfood.gemspec:  Gem dependency, require files, gem informations.
// fastfood.rb: Main file
// engine.rb: A rails module to manage your assets
// vendor folder: Your assets

fastfood.gemspec do |s|        = 'fastfood'
  s.version     = '0.0.1'        = '2010-10-10'
  s.summary     = 'Summary...'
  s.description = 'Description...'
  s.authors     = ["Eovy"]       = ''
  s.files       = Dir.glob('{vendor,lib}/**/*')   # Load files in vendor and lib folder
  s.homepage    = ''
  s.license       = 'MIT'
  s.require_paths = ['lib']

  s.add_development_dependency 'rails', '~> 5.1'


require "fastfood/engine"

module Fastfood
  def self.hi
    puts 'Hello world'


module Fastfood
  class Engine < ::Rails::Engine
    # Rails will handle your assets automatically!

Drop some lines for testing

# ff.js
alert('JS is loaded')
# ff.css
.disappear {
  display: none;

OK! now you can build and install your gem
Please note that you must re-build your gem if anything changed!
After building, it will generate a compiled file.

gem build fastfood.gemspec

# Successfully built RubyGem
# Name: fastfood
# Version: 0.0.1
# File: fastfood-0.0.1.gem

Check your gem with a Rails project
Open a Rails project and add your gem to Gemfile

gem 'fastfood', path: '/Users/conficker/workspace/fastfood/' # Local path

and run

bundle install

Run rails s and check your first gem :D. Happy coding!