Skip to content

Commit 5838120

Browse files
committed
fix instruction mistake and add instructions for fixing rake sequel create command
1 parent 0c036fa commit 5838120

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ Gemfile.lock
3535
*.gemfile.lock
3636

3737
spec/internal/db/database.sqlite3
38+
.idea/*

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ The top of your `config/application.rb` will probably look something like:
5858
active_job/railtie
5959
rails/test_unit/railtie
6060
).each do |railtie|
61-
require railtie
62-
rescue LoadError
61+
begin
62+
require railtie
63+
rescue LoadError
6364
end
6465
end
6566
```
@@ -97,6 +98,16 @@ Rake `db:*` mappings are currently not supported in Rails 7, so you'll need to u
9798
the `sequel:*` tasks instead. For example, to migrate your database, you'll need to
9899
run `rails sequel:migrate` instead of `rails db:migrate`.
99100

101+
The rake command to create your db requires that Sequel does not attempt to connect
102+
to load models before creating the db. Add this to your `config/application.rb`
103+
104+
```
105+
# config/application.rb
106+
if defined?(Rake.application) && Rake.application.top_level_tasks.include?('sequel:create')
107+
config.sequel.skip_connect = true
108+
end
109+
```
110+
100111
After those changes, you should be good to go!
101112

102113
Features provided by `sequel-rails`

0 commit comments

Comments
 (0)