을 찾을 수 있지만, 내가 해결 방법을 모르는 오류로 실행 할 수 없습니다.Gitlab CI 설치 오류 - 내 루비 온 레일스 프로젝트에 대한 설정 Gitlab CI에 노력하고 자바 스크립트 실행
응용 프로그램은 루비 2.3.1에서 실행되고, 5.0 레일과 PostgreSQL 데이터베이스를 사용하고 있습니다.
나의 현재 .gitlab.ci.yml 파일은 다음과 같다 :
# https://hub.docker.com/r/library/ruby/tags/
image: "ruby:2.3.0"
# Pick zero or more services to be used on all builds.
# Only needed when using a docker container to run your tests in.
# Check out: http://docs.gitlab.com/ce/ci/docker/using_docker_images.html#what-is-service
services:
- redis:latest
- postgres:latest
- node:latest
# This is a basic example for a gem or script which doesn't use
# services such as redis or postgres
before_script:
- gem install bundler # Bundler is not installed with the image
- bundle install -j $(nproc) # Install dependencies
rubocop:
script:
- rubocop
rspec:
script:
- rspec spec
rails:
script:
- rails db:migrate
- rspec spec
그래서 그것이 실행으로 NodeJS를 사용하기로했다. 그러나 다음 오류가 발생합니다.
$ rails db:migrate
rails aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'uglifier'.
Gem Load Error is: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
Backtrace for gem load error is:
/usr/local/bundle/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect'
/usr/local/bundle/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
/usr/local/bundle/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>'
/usr/local/bundle/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:293:in `require'
/usr/local/bundle/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:293:in `block in require'
/usr/local/bundle/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:259:in `load_dependency'
/usr/local/bundle/gems/activesupport-5.0.0.rc2/lib/active_support/dependencies.rb:293:in `require'
/usr/local/bundle/gems/uglifier-3.0.0/lib/uglifier.rb:5:in `<top (required)>'
이 줄을 추가? 어떤 시스템입니까? https://about.gitlab.com/gitlab-ci/ – miccet
는 시스템입니다. 보시다시피 환경을 설정하기 위해 도커 패키지를 사용하고 있습니다. 위의 내용은 실제로이 CI 서버 (https://about.gitlab.com/gitlab-ci/)의 실제 액세스 권한이없는 시스템에 유효한 ofc입니다. – Severin