Say that you clone the repo for the second time in a different location in your 
machine[^git-worktree]. Since the DB is already set up, you don't need to 
`db:create` or `db:migrate` or anything like that, you just copy the same 
`database.yml` file and run the tests.

Unfortunately, in that case you will have a few of tests failing with this:

```
bin/rails test test/controllers/site_controller_test.rb:419

E

Error:
SiteControllerTest#test_copyright:
ActionView::Template::Error: The asset "i18n/en.js" is not present in the asset 
pipeline.

    app/views/layouts/_head.html.erb:7
    app/views/layouts/_head.html.erb:3
    app/views/layouts/site.html.erb:5
    app/views/layouts/site.html.erb:2
    config/initializers/policy_headers.rb:13:in 
'OpenStreetMap::Rack::PolicyHeaders#call'
    config/initializers/compressed_requests.rb:33:in 
'OpenStreetMap::CompressedRequests#call'
    test/controllers/site_controller_test.rb:402:in 
'SiteControllerTest#test_copyright'
```

Today I learned that some of our scripts, including the DB rake scripts, 
generate the files in `app/assets/javascripts/i18n/`. But if you don't run the 
DB rake scripts, those won't be generated, causing this failure.

[^git-worktree]: probably will happen to users of [git 
worktree](https://git-scm.com/docs/git-worktree) but I haven't used it in a 
while and haven't checked. I was doing this manually when I came across the 
issue.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/7214

-- Commit Summary --

  * Document step to generate i18n files

-- File Changes --

    M doc/MANUAL_INSTALL.md (8)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/7214.patch
https://github.com/openstreetmap/openstreetmap-website/pull/7214.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7214
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to