Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save manuwell/faafcf15eba892d9f5839697f6b24511 to your computer and use it in GitHub Desktop.
Save manuwell/faafcf15eba892d9f5839697f6b24511 to your computer and use it in GitHub Desktop.

Perhaps talking to them and explain your point of view. Try to present the benefits you think you can get with rails panel. I think all will learn in the discussion.

But if you want to, I tested here and this works:

# in your Gemfile

# double exclamation (!!) point just to ensure to return a bool
gem 'meta_request', require: !!ENV['APP_WITH_RAILS_PANEL']

After that, perform a bundle install. Here, all people will have to install rails_panel, but if they want to use, just:

APP_WITH_RAILS_PANEL=1 bundle exec rails s

When the rails server boot, it will read the Gemfile and will see that it has to require the rails_panel gem. It will load fine.

If you don't want to pass the ENV var every time, you can export from your $HOME/.bashrc, and everytime you open a shell it will already be there, by running:

echo 'export APP_WITH_RAILS_PANEL=1' >> $HOME/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment