Ruby on rails 在Rails 5上使用webpacker时,Travis需要什么设置?
我是第一次使用travis,我不知道如何正确地添加webpacker 以下是我目前在中看到的.travis.ymlRuby on rails 在Rails 5上使用webpacker时,Travis需要什么设置?,ruby-on-rails,ruby-on-rails-5,travis-ci,webpacker,Ruby On Rails,Ruby On Rails 5,Travis Ci,Webpacker,我是第一次使用travis,我不知道如何正确地添加webpacker 以下是我目前在中看到的.travis.yml language: ruby rvm: - 2.4.4 addons: postgresql: "9.4" before_install: - "echo 'gem: --no-document' > ~/.gemrc" - "echo '--colour' > ~/.rspec" - export DISPLAY=:99.0 - sh -
language: ruby
rvm:
- 2.4.4
addons:
postgresql: "9.4"
before_install:
- "echo 'gem: --no-document' > ~/.gemrc"
- "echo '--colour' > ~/.rspec"
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
before_script:
- bundle exec rake db:create db:migrate RAILS_ENV=test
- bundle exec rails webpacker:compile
这是构建错误
$ bundle exec rails webpacker:compile
Webpacker is installed well maybe it could help someone else: so here the setup that is finally working
language: ruby
rvm:
- 2.4.4
addons:
postgresql: "9.4"
before_install:
- "echo 'gem: --no-document' > ~/.gemrc"
- "echo '--colour' > ~/.rspec"
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
before_script:
- bundle exec rake db:create db:migrate RAILS_ENV=test
cache:
bundler: true
directories:
- node_modules
yarn: true
install:
- bundle install
- nvm install node
- node -v
- npm i -g yarn
- yarn
script:
- bundle exec rails webpacker:compile
- bundle exec rails spec
$bundle exec rails网页包:编译
Webpacker已经安装了也许它可以帮助其他人:所以这里的安装程序终于开始工作了
您不应该在railswebacker:compile
之前运行railswebacker:install
?