Skip to content

Commit

Permalink
Merge pull request #198 from opensourceame/master
Browse files Browse the repository at this point in the history
fix instruction mistake and add instructions for fixing rake sequel c…
  • Loading branch information
JonathanTron authored Oct 18, 2023
2 parents d9fb175 + 5838120 commit 468ae45
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ Gemfile.lock
*.gemfile.lock

spec/internal/db/database.sqlite3
.idea/*
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ The top of your `config/application.rb` will probably look something like:
active_job/railtie
rails/test_unit/railtie
).each do |railtie|
require railtie
rescue LoadError
begin
require railtie
rescue LoadError
end
end
```
Expand Down Expand Up @@ -97,6 +98,16 @@ Rake `db:*` mappings are currently not supported in Rails 7, so you'll need to u
the `sequel:*` tasks instead. For example, to migrate your database, you'll need to
run `rails sequel:migrate` instead of `rails db:migrate`.

The rake command to create your db requires that Sequel does not attempt to connect
to load models before creating the db. Add this to your `config/application.rb`

```
# config/application.rb
if defined?(Rake.application) && Rake.application.top_level_tasks.include?('sequel:create')
config.sequel.skip_connect = true
end
```

After those changes, you should be good to go!

Features provided by `sequel-rails`
Expand Down

0 comments on commit 468ae45

Please sign in to comment.