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 6744385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:04:38+00:00 2026-05-26T12:04:38+00:00

I am creating a Rails plugin (yes, I need a plugin, not a gem).

  • 0

I am creating a Rails plugin (yes, I need a plugin, not a gem).

This plugin has several gem dependencies. My first thought was to list the dependencies in a Gemfile at the root of the plugin directory.

From the install.rb, I did the following :

`bundle install`

And then from init.rb, I did the following :

require 'rubygems'
require 'bundler/setup'
Bundler.require

But bundler is not definitely these dependencies.

I do not want to have to list the gem dependencies in the root Gemfile.

Is there any way to include these gems within the plugin and just have it work without the end user having to alter their own Gemfile? I’m not opposed to ditching Bundler all together if there were some other mechanism for pulling in gem dependencies for Rails plugins?

  • 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-05-26T12:04:39+00:00Added an answer on May 26, 2026 at 12:04 pm

    It doesn’t require your gems because the gem environment (gem set, whatever) is already set up by the app.

    It’s not possible to isolate the plugin’s gem env from the app’s gem env for the simple reason that the plugin runs inside the app.

    Thus, the plugin runs in the app’s gem env.

    If the app’s gem env is managed by Bundler, then your dependencies must be defined in the app’s Gemfile. Otherwise they won’t be available inside the gem env isolated by Bundler, no matter what you would require from inside your plugin.

    This is one of the reasons why it’s more practical to release plugins as gems.

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

Sidebar

Related Questions

I'm working on creating my first plugin for rails. I'm still pretty new to
When creating a rails engine in 2.3.5 as a plugin, how can the gem
I am creating a Rails plugin and it is dynamically adding a method to
So I'm creating a plugin for Ruby on Rails to make implemented addresses including
Rails has no way of creating foreign keys in migrations (there are plugins to
I need some advice, what is the rule of the thumb when creating Rails
I am creating a rails app and have used this code in one of
We are creating a rails application for an already existing database. We need to
I'm creating a new plugin for a jruby on rails application that will eventually
Using Rails 2.3.11 , I'm creating a plugin for Redmine that add methods to

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.