Skip to content

Instantly share code, notes, and snippets.

@bradgessler
Created August 31, 2023 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bradgessler/90f09a20322500d649ab3267850c6a58 to your computer and use it in GitHub Desktop.
Save bradgessler/90f09a20322500d649ab3267850c6a58 to your computer and use it in GitHub Desktop.
Setups up repos in `./gems` from the root of a Rails project as local gems. This makes framework development much easier.
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require_relative "config/application"
Rails.application.load_tasks
desc "Set local gems"
task :gems do
Dir["gems/**"].each do |path|
sh "bundle config local.#{File.basename(path)} #{path}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment