Skip to content

Commit 7a4ed01

Browse files
Include Rails environment as task dependency (#1205)
Closes #1204 The `suspenders:cleanup:organize_gemfile` task was not loading the Rails environment, resulting in the following error: ``` undefined method `starts_with?' for an instance of String ``` This was only happening on existing applications not generated by the [application template][]. [application template]: https://raw.githubusercontent.com/thoughtbot/suspenders/main/lib/install/web.rb
1 parent 17c3745 commit 7a4ed01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/tasks/suspenders.rake

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace :suspenders do
2525

2626
namespace :cleanup do
2727
desc "Organizes Gemfile"
28-
task :organize_gemfile do
28+
task organize_gemfile: :environment do
2929
Suspenders::Cleanup::OrganizeGemfile.perform(Rails.root.join("Gemfile"))
3030
end
3131

0 commit comments

Comments
 (0)