Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8725289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:00:36+00:00 2026-06-13T08:00:36+00:00

I was wondering what the differences are between using a Ruby gem to include

  • 0

I was wondering what the differences are between using a Ruby gem to include a JavaScript library into a Rails project versus including the JavaScript file yourself.

I do know that you can lock down a version of the js library using bundler or alternatively, update all of your js libraries through bundler with one command instead of manually coping and pasting js files into your project. How much overhead does the Rails::Engine class add and is this the only way to get the asset files from a gem available in a Rails app? Are there any other notable differences that shows which way is “the best” way to include these libraries?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T08:00:37+00:00Added an answer on June 13, 2026 at 8:00 am

    Great post from olaf_from_norweden on reddit with the answer:

    Let’s walk through what the Sass port of the Twitter Bootstrap gem
    actually does:

    https://github.com/thomas-mcdonald/bootstrap-sass/blob/master/lib/bootstrap-sass.rb

    When the bootstrap gem is evaluated on Rails initialization (when you
    boot up the server), it uses require to load various parts of itself
    depending on the environment.

    If the Compass Sass framework gem is
    loaded, it tells Compass the Rails asset folder paths to use.

    If you’re using a Rails version with the asset pipeline, it loads an
    empty Rails::Engine.

    Engines are just Rails apps that you can mount
    onto other Rails apps. When Rails encounters an engine during
    initialization, it looks up the paths that the engine specifies to
    load relevant files.

    In this case, the gemspec tells Rails during initialization about the .scss/.png/.js files in its included vendor directory.

    In development mode, Rails will recompile these assets on
    every request along with the other assets in the main application.

    In production, the bootstrap gem isn’t even loaded because it goes in the
    :assets group of your Gemfile.

    Hope that makes sense. Not the best or
    most salient explanation. And even if the gem was loaded in
    production, Rails doesn’t go hunting for assets directories unless
    it’s compiling assets. So it doesn’t even matter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm wondering what the key differences between using a SQL Server Compact database (
I was wondering what exactly are the differences between using the (get) accessor for
I am wondering what's the difference between using rails server -d and using nohup
I'm wondering if there is a difference performance wise between using COUNT(*) and COUNT(date_created)
I am wondering what the differences are between binary and text based protocols. I
I am wondering if anyone has any real world numbers on performance differences between
I was wondering about the difference between the build/clean&build in c++ project in netbeans
Are there any differences between external domains, and subdomains when using EasyXDM ? I
I've been using NHibernate for a while now, I'm still wondering what the differences
I was wondering if there is a difference between using .xib files for GUI

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.