Skip to content

Commit

Permalink
Use rails instead of rake
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Dec 21, 2022
1 parent 6f471c7 commit fb9219a
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ jobs:
restore-keys: |
yarn-${{ env.os }}-
- name: Install node modules
run: bundle exec rake yarn:install
run: bundle exec rails yarn:install
- name: Create dummy database configuration
run: cp config/example.database.yml config/database.yml
- name: Run eslint
run: bundle exec rake eslint
run: bundle exec rails eslint
brakeman:
name: Brakeman
runs-on: ubuntu-20.04
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ jobs:
- name: Populate database
run: |
sed -f script/normalise-structure db/structure.sql > db/structure.expected
bundle exec rake db:migrate
bundle exec rails db:migrate
sed -f script/normalise-structure db/structure.sql > db/structure.actual
diff -uw db/structure.expected db/structure.actual
- name: Export javascript strings
run: bundle exec rake i18n:js:export
run: bundle exec rails i18n:js:export
- name: Install node modules
run: bundle exec rake yarn:install
run: bundle exec rails yarn:install
- name: Run tests
run: bundle exec rails test:all
- name: Report completion to Coveralls
Expand Down
4 changes: 2 additions & 2 deletions CONFIGURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ If your installation stops working for some reason:
* The OSM database schema is changed periodically and you need to keep up with these improvements. Go to your `openstreetmap-website` directory and run:

```
bundle exec rake db:migrate
bundle exec rails db:migrate
```

## Testing on the osm dev server
Expand All @@ -145,5 +145,5 @@ If you want to deploy `openstreetmap-website` for production use, you'll need to
* It's not recommended to use `rails server` in production. Our recommended approach is to use [Phusion Passenger](https://www.phusionpassenger.com/). Instructions are available for [setting it up with most web servers](https://www.phusionpassenger.com/documentation_and_support#documentation).
* Passenger will, by design, use the Production environment and therefore the production database - make sure it contains the appropriate data and user accounts.
* The included version of the map call is quite slow and eats a lot of memory. You should consider using [CGIMap](https://github.com/zerebubuth/openstreetmap-cgimap) instead.
* Make sure you generate the i18n files and precompile the production assets: `RAILS_ENV=production rake i18n:js:export assets:precompile`
* Make sure you generate the i18n files and precompile the production assets: `RAILS_ENV=production rails i18n:js:export assets:precompile`
* Make sure the web server user as well as the rails user can read, write and create directories in `tmp/`.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ development to check that your code matches our guidelines:

```
bundle exec rubocop
bundle exec rake eslint
bundle exec rails eslint
bundle exec erblint .
```

Expand Down
2 changes: 1 addition & 1 deletion DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ This will launch one Docker container for each 'service' specified in `docker-co

Run the Rails database migrations:

docker-compose run --rm web bundle exec rake db:migrate
docker-compose run --rm web bundle exec rails db:migrate

### Tests

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ RUN gem install bundler \
&& bundle install

# Install NodeJS packages using yarnpkg
# `bundle exec rake yarn:install` will not work
# `bundle exec rails yarn:install` will not work
ADD package.json yarn.lock /app/
RUN yarnpkg --ignore-engines install
6 changes: 3 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ bundle install
We use [Yarn](https://yarnpkg.com/) to manage the Node.js modules required for the project.

```
bundle exec rake yarn:install
bundle exec rails yarn:install
```

## Prepare local settings file
Expand Down Expand Up @@ -185,15 +185,15 @@ exit
To create the three databases - for development, testing and production - run:

```
bundle exec rake db:create
bundle exec rails db:create
```

### Database structure

To create all the tables, indexes and constraints, run:

```
bundle exec rake db:migrate
bundle exec rails db:migrate
```

## Running the tests
Expand Down

0 comments on commit fb9219a

Please sign in to comment.