wicked_pdf
wicked_pdf copied to clipboard
Can't run tests
Issue description
I've forked the project to make a small change that we need, and I would like to run the test suite to ensure I haven't broken anything. I can't get it to run.
Expected or desired behavior
rake test
(or just rake
) should run tests. It fails with File does not exist: bootsnap/setup
(or sometimes File does not exist: test/unit
)
System specifications
wicked_pdf gem version (output of cat Gemfile.lock | grep wicked_pdf
): 2.1.0
wkhtmltopdf version (output of wkhtmltopdf --version
): n/a
whtmltopdf provider gem and version if one is used: n/a
platform/distribution and version (e.g. Windows 10 / Ubuntu 16.04 / Heroku cedar):
Mac OS X
Details
I'm using rvm
, I wonder if that's an issue?
rvm use 2.7.1
rvm gemset use wicked_pdf --create
bundle install
bundle exec rake
Creating dummy application to run tests
create
create README.md
create Rakefile
create .ruby-version
create config.ru
create .gitignore
create Gemfile
run git init from "."
Initialized empty Git repository in /Users/denis/em/wicked_pdf/test/dummy/.git/
create package.json
create app
create app/assets/config/manifest.js
create app/assets/stylesheets/application.css
create app/channels/application_cable/channel.rb
create app/channels/application_cable/connection.rb
create app/controllers/application_controller.rb
create app/helpers/application_helper.rb
create app/javascript/channels/consumer.js
create app/javascript/channels/index.js
create app/javascript/packs/application.js
create app/jobs/application_job.rb
create app/mailers/application_mailer.rb
create app/models/application_record.rb
create app/views/layouts/application.html.erb
create app/views/layouts/mailer.html.erb
create app/views/layouts/mailer.text.erb
create app/assets/images
create app/assets/images/.keep
create app/controllers/concerns/.keep
create app/models/concerns/.keep
create bin
create bin/rails
create bin/rake
create bin/setup
create bin/yarn
create config
create config/routes.rb
create config/application.rb
create config/environment.rb
create config/cable.yml
create config/puma.rb
create config/spring.rb
create config/storage.yml
create config/environments
create config/environments/development.rb
create config/environments/production.rb
create config/environments/test.rb
create config/initializers
create config/initializers/application_controller_renderer.rb
create config/initializers/assets.rb
create config/initializers/backtrace_silencers.rb
create config/initializers/content_security_policy.rb
create config/initializers/cookies_serializer.rb
create config/initializers/cors.rb
create config/initializers/filter_parameter_logging.rb
create config/initializers/inflections.rb
create config/initializers/mime_types.rb
create config/initializers/new_framework_defaults_6_0.rb
create config/initializers/wrap_parameters.rb
create config/locales
create config/locales/en.yml
create config/master.key
append .gitignore
create config/boot.rb
create config/database.yml
create db
create db/seeds.rb
create lib
create lib/tasks
create lib/tasks/.keep
create lib/assets
create lib/assets/.keep
create log
create log/.keep
create public
create public/404.html
create public/422.html
create public/500.html
create public/apple-touch-icon-precomposed.png
create public/apple-touch-icon.png
create public/favicon.ico
create public/robots.txt
create tmp
create tmp/.keep
create tmp/pids
create tmp/pids/.keep
create tmp/cache
create tmp/cache/assets
create vendor
create vendor/.keep
create test/fixtures
create test/fixtures/.keep
create test/fixtures/files
create test/fixtures/files/.keep
create test/controllers
create test/controllers/.keep
create test/mailers
create test/mailers/.keep
create test/models
create test/models/.keep
create test/helpers
create test/helpers/.keep
create test/integration
create test/integration/.keep
create test/channels/application_cable/connection_test.rb
create test/test_helper.rb
create test/system
create test/system/.keep
create test/application_system_test_case.rb
create storage
create storage/.keep
create tmp/storage
create tmp/storage/.keep
remove config/initializers/cors.rb
remove config/initializers/new_framework_defaults_6_0.rb
run bundle install
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 13.0.1
Using concurrent-ruby 1.1.6
Using i18n 1.8.3
Using minitest 5.14.1
Using thread_safe 0.3.6
Using tzinfo 1.2.7
Using zeitwerk 2.4.0
Using activesupport 6.0.3.2
Using builder 3.2.4
Using erubi 1.9.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.10
Using rails-dom-testing 2.0.3
Using crass 1.0.6
Using loofah 2.6.0
Using rails-html-sanitizer 1.3.0
Using actionview 6.0.3.2
Using rack 2.2.3
Using rack-test 1.1.0
Using actionpack 6.0.3.2
Using nio4r 2.5.2
Using websocket-extensions 0.1.5
Using websocket-driver 0.7.3
Using actioncable 6.0.3.2
Using globalid 0.4.2
Using activejob 6.0.3.2
Using activemodel 6.0.3.2
Using activerecord 6.0.3.2
Using mimemagic 0.3.5
Using marcel 0.3.3
Using activestorage 6.0.3.2
Using mini_mime 1.0.2
Using mail 2.7.1
Using actionmailbox 6.0.3.2
Using actionmailer 6.0.3.2
Using actiontext 6.0.3.2
Fetching public_suffix 4.0.5
Installing public_suffix 4.0.5
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching bindex 0.8.1
Installing bindex 0.8.1 with native extensions
Fetching msgpack 1.3.3
Installing msgpack 1.3.3 with native extensions
Fetching bootsnap 1.4.6
Installing bootsnap 1.4.6 with native extensions
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching regexp_parser 1.7.1
Installing regexp_parser 1.7.1
Fetching xpath 3.2.0
Installing xpath 3.2.0
Fetching capybara 3.33.0
Installing capybara 3.33.0
Fetching childprocess 3.0.0
Installing childprocess 3.0.0
Fetching ffi 1.13.1
Installing ffi 1.13.1 with native extensions
Fetching jbuilder 2.10.0
Installing jbuilder 2.10.0
Fetching rb-fsevent 0.10.4
Installing rb-fsevent 0.10.4
Fetching rb-inotify 0.10.1
Installing rb-inotify 0.10.1
Fetching listen 3.2.1
Installing listen 3.2.1
Using method_source 1.0.0
Fetching puma 4.3.5
Installing puma 4.3.5 with native extensions
Fetching rack-proxy 0.6.5
Installing rack-proxy 0.6.5
Using thor 1.0.1
Using railties 6.0.3.2
Using sprockets 4.0.2
Using sprockets-rails 3.2.1
Using rails 6.0.3.2
Fetching rubyzip 2.3.0
Installing rubyzip 2.3.0
Fetching sassc 2.4.0
Installing sassc 2.4.0 with native extensions
Fetching tilt 2.0.10
Installing tilt 2.0.10
Fetching sassc-rails 2.1.2
Installing sassc-rails 2.1.2
Fetching sass-rails 6.0.0
Installing sass-rails 6.0.0
Fetching selenium-webdriver 3.142.7
Installing selenium-webdriver 3.142.7
Fetching spring 2.1.0
Installing spring 2.1.0
Fetching spring-watcher-listen 2.0.1
Installing spring-watcher-listen 2.0.1
Using sqlite3 1.4.2
Fetching turbolinks-source 5.2.0
Installing turbolinks-source 5.2.0
Fetching turbolinks 5.2.1
Installing turbolinks 5.2.1
Fetching web-console 4.0.4
Installing web-console 4.0.4
Fetching webdrivers 4.4.1
Installing webdrivers 4.4.1
Fetching webpacker 4.2.2
Installing webpacker 4.2.2
Bundle complete! 17 Gemfile dependencies, 74 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
run bundle binstubs bundler
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
run bundle exec spring binstub --all
* bin/rake: Spring inserted
* bin/rails: Spring inserted
rails webpacker:install
Traceback (most recent call last):
3: from bin/rails:8:in `<main>'
2: from bin/rails:8:in `require_relative'
1: from /Users/denis/em/wicked_pdf/test/dummy/config/boot.rb:4:in `<top (required)>'
/Users/denis/em/wicked_pdf/test/dummy/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError)
/Users/denis/.rvm/rubies/ruby-2.7.1/bin/ruby -w -I"lib:lib:test" -I"/Users/denis/.rvm/rubies/ruby-2.7.1/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib" "/Users/denis/.rvm/rubies/ruby-2.7.1/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb" "test/functional/pdf_helper_test.rb" "test/functional/wicked_pdf_helper_assets_test.rb" "test/functional/wicked_pdf_helper_test.rb" "test/unit/wicked_pdf_test.rb" "test/unit/wkhtmltopdf_location_test.rb"
File does not exist: bootsnap/setup
rake aborted!
Command failed with status (1): [ruby -w -I"lib:lib:test" -I"/Users/denis/.rvm/rubies/ruby-2.7.1/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib" "/Users/denis/.rvm/rubies/ruby-2.7.1/lib/ruby/gems/2.7.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb" "test/functional/pdf_helper_test.rb" "test/functional/wicked_pdf_helper_assets_test.rb" "test/functional/wicked_pdf_helper_test.rb" "test/unit/wicked_pdf_test.rb" "test/unit/wkhtmltopdf_location_test.rb" ]
/Users/denis/em/wicked_pdf/Rakefile:30:in `block in <top (required)>'
/Users/denis/.rvm/rubies/ruby-2.7.1/bin/bundle:23:in `load'
/Users/denis/.rvm/rubies/ruby-2.7.1/bin/bundle:23:in `<main>'
/Users/denis/.rvm/gems/ruby-2.7.1@wicked_pdf/bin/ruby_executable_hooks:24:in `eval'
/Users/denis/.rvm/gems/ruby-2.7.1@wicked_pdf/bin/ruby_executable_hooks:24:in `<main>'
Tasks: TOP => test
(See full trace by running task with --trace)
This project runs across a very broad range of Rails versions. If you push your fork to a pull request, Travis-CI will run the specs for you across all the configurations we support, and you can see the result of that run in the PR, or by browsing the list here: https://travis-ci.org/github/mileszs/wicked_pdf/pull_requests
If you know of a better way to make this work across all these configurations, I'm certainly open to it. I'm not a big fan of "push and let CI tell me" either.
You can use one of the CI gemfiles locally:
BUNDLE_GEMFILE=gemfiles/7.0.gemfile bundle exec rake
You may also need to set WKHTMLTOPDF_BIN
.