Skip to content

Commit

Permalink
Ensure bin/setup works
Browse files Browse the repository at this point in the history
Closes #1224

It's unclear why we need to run migrations, since we were originally
calling [db:prepare][dbp] which does the following:

> If the database exists but the tables have not been created, the
command will load the schema, run any pending migrations, dump the
updated schema, and finally load the seed data. See the Seeding Data
documentation for more details.

However, I found that calling `db:migrate` in the application template
worked.

[dbp]: https://guides.rubyonrails.org/active_record_migrations.html#preparing-the-database
  • Loading branch information
stevepolitodesign committed Dec 5, 2024
1 parent 947dccf commit 984b102
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Unreleased
* Fixed: [Specify a tag when installing capybara_accessible_selectors](https://github.com/thoughtbot/suspenders/issues/1228)
* Fixed: [Issue 1229: How do we want to handle un-released versions?](https://github.com/thoughtbot/suspenders/issues/1229)
* Fixed: [Issue 1222: README instructions for running the development server are wrong](https://github.com/thoughtbot/suspenders/issues/1222)
* Fixed: [#1224](https://github.com/thoughtbot/suspenders/issues/1224)

[linting configuration]: https://github.com/thoughtbot/suspenders/blob/main/FEATURES.md#linting

Expand Down
2 changes: 1 addition & 1 deletion lib/install/web.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def apply_template!
run "bundle install"

generate "suspenders:install:web"
rails_command "db:prepare"
rails_command "db:migrate"

say "\nCongratulations! You just pulled our suspenders."
end
Expand Down

0 comments on commit 984b102

Please sign in to comment.