Skip to content

Instantly share code, notes, and snippets.

@sergii
Forked from bradgessler/Rakefile
Created September 8, 2023 21:33
Show Gist options
  • Save sergii/b931e76f65283f3065efd4b9da7cc8c3 to your computer and use it in GitHub Desktop.
Save sergii/b931e76f65283f3065efd4b9da7cc8c3 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