summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0c7fa2c)
Since rails 7, the `rails yarn:install` command no longer uses
bin/yarn and so a) doesn't detect yarn binaries named "yarnpkg"
(e.g. Ubuntu) and b) doesn't allow us to pass any flags to yarn,
(e.g. "--ignore-engines").
Since we want to avoid making the installation more difficult (by
e.g. installing yarn from other sources, or requiring particular
node versions) we can instead just use our existing bin/yarn script.
The reason Dockerfile did its own thing was to avoid pulling in
big chunks of rails, but bin/yarn is a standalone ruby script.
Fixes #3579
restore-keys: |
yarn-${{ env.os }}-
- name: Install node modules
restore-keys: |
yarn-${{ env.os }}-
- name: Install node modules
- run: bundle exec rails yarn:install
+ run: bundle exec bin/yarn install
- name: Create dummy database configuration
run: cp config/example.database.yml config/database.yml
- name: Run eslint
- name: Create dummy database configuration
run: cp config/example.database.yml config/database.yml
- name: Run eslint
- name: Export javascript strings
run: bundle exec rails i18n:js:export
- name: Install node modules
- name: Export javascript strings
run: bundle exec rails i18n:js:export
- name: Install node modules
- run: bundle exec rails yarn:install
+ run: bundle exec bin/yarn install
- name: Compile assets
run: bundle exec rails assets:precompile
- name: Run tests
- name: Compile assets
run: bundle exec rails assets:precompile
- name: Run tests
RUN gem install bundler \
&& bundle install
RUN gem install bundler \
&& bundle install
-# Install NodeJS packages using yarnpkg
-# `bundle exec rails yarn:install` will not work
+# Install NodeJS packages using yarn
ADD package.json yarn.lock /app/
ADD package.json yarn.lock /app/
-RUN yarnpkg --ignore-engines install
+ADD bin/yarn /app/bin/
+RUN bundle exec bin/yarn install
We use [Yarn](https://yarnpkg.com/) to manage the Node.js modules required for the project.
```
We use [Yarn](https://yarnpkg.com/) to manage the Node.js modules required for the project.
```
-bundle exec rails yarn:install
+bundle exec bin/yarn install
```
## Prepare local settings file
```
## Prepare local settings file
# do bundle install as a convenience
bundle install --retry=10 --jobs=2
# do yarn install as a convenience
# do bundle install as a convenience
bundle install --retry=10 --jobs=2
# do yarn install as a convenience
-bundle exec rake yarn:install
+bundle exec bin/yarn install
# create user and database for openstreetmap-website
db_user_exists=`sudo -u postgres psql postgres -tAc "select 1 from pg_roles where rolname='vagrant'"`
if [ "$db_user_exists" != "1" ]; then
# create user and database for openstreetmap-website
db_user_exists=`sudo -u postgres psql postgres -tAc "select 1 from pg_roles where rolname='vagrant'"`
if [ "$db_user_exists" != "1" ]; then