I'm building an existing asciidoc project on a new machine and while it works on my old machine, on the new one it throws this error:
$ bundle exec asciidoctor-pdf book.adoc
bundler: failed to load command: asciidoctor-pdf (/book/vendor/bundle/ruby/3.1.0/bin/asciidoctor-pdf)
/book/vendor/bundle/ruby/3.1.0/gems/prawn-2.4.0/lib/prawn/transformation_stack.rb:10:in `require': cannot load such file -- matrix (LoadError)
from /book/vendor/bundle/ruby/3.1.0/gems/prawn-2.4.0/lib/prawn/transformation_stack.rb:10:in `<top (required)>'
from /book/vendor/bundle/ruby/3.1.0/gems/prawn-2.4.0/lib/prawn.rb:67:in `require_relative'
from /book/vendor/bundle/ruby/3.1.0/gems/prawn-2.4.0/lib/prawn.rb:67:in `<top (required)>'
from /book/vendor/bundle/ruby/3.1.0/gems/asciidoctor-pdf-1.6.2/lib/asciidoctor/pdf.rb:5:in `require'
from /book/vendor/bundle/ruby/3.1.0/gems/asciidoctor-pdf-1.6.2/lib/asciidoctor/pdf.rb:5:in `<top (required)>'
from /book/vendor/bundle/ruby/3.1.0/gems/asciidoctor-pdf-1.6.2/bin/asciidoctor-pdf:5:in `require'
from /book/vendor/bundle/ruby/3.1.0/gems/asciidoctor-pdf-1.6.2/bin/asciidoctor-pdf:5:in `<top (required)>'
from /book/vendor/bundle/ruby/3.1.0/bin/asciidoctor-pdf:25:in `load'
from /book/vendor/bundle/ruby/3.1.0/bin/asciidoctor-pdf:25:in `<top (required)>'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/cli/exec.rb:58:in `load'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/cli/exec.rb:58:in `kernel_load'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/cli/exec.rb:23:in `run'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/cli.rb:484:in `exec'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/cli.rb:31:in `dispatch'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/cli.rb:25:in `start'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/exe/bundle:48:in `block in <top (required)>'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
from /book/vendor/bundle/ruby/3.1.0/gems/bundler-2.3.8/exe/bundle:36:in `<top (required)>'
from /opt/homebrew/opt/ruby/bin/bundle:25:in `load'
from /opt/homebrew/opt/ruby/bin/bundle:25:in `<main>'
I'm using bundler 2.3.8 and my Gemfile source is:
source 'https://rubygems.org'
gem 'asciidoctor', "2.0.17"
gem 'asciidoctor-pdf', "1.6.2"
Cause
This asciidoctor-pdf error is casued by a prawn 2.4 compatibily issue with ruby 3.1 that will be solved in the next prawn release.
Since prawn 2.4 is a dependency of asciidoctor-pdf 1.6.2, it doesn't works on ruby > 3.0.x.
Solution
In order to avoid this error, you need to use a compatible ruby version like 3.0.3 or >2.5.
You can install it easily using a version manager like rvm or asdf.
Related
I am trying to build Rails from source for the latest stable (4.2) version from the branch 4-2-stable; however I am getting a segmentation fault at 'activesupport' for rake tests.
The details of error log are as below:
Platform I am trying on: Ubuntu 14.10 Rails Version: 4.2.3 Ruby
Version: 2.2.2 & 2.1.6 (on both versions getting same trace)
Log:
** Invoke test (first_time)
** Execute test
/home/test/.rvm/rubies/ruby-2.1.6/bin/ruby -w -I"lib:test"
-I"/home/test/.rvm/gems/ruby-2.1.6/gems/rake-10.4.2/lib" "/home/test/.rvm/gems/ruby-2.1.6/gems/rake-10.4.2/lib/rake/rake_test_loader.rb"
"test/**/*_test.rb"
Run options: --seed 36135
Running:
................................................................................................................................................................................ Segmentation fault
rake aborted!
Command failed with status (139): [ruby -w -I"lib:test"
-I"/home/test/.rvm/gems/ruby-2.1.6/gems/rake-10.4.2/lib" "/home/test/.rvm/gems/ruby-2.1.6/gems/rake-10.4.2/lib/rake/rake_test_loader.rb"
"test/**/*_test.rb" ]
/home/test/.rvm/gems/ruby-2.1.6/gems/rake-10.4.2/lib/rake/testtask.rb:108:in
`block (3 levels) in define'
Can anyone provide any pointers so as to fix this?
In the last few days we've had a previously working AWS Cloud Formation and associated Chef script start failing. At this point there does not seem to be any identifiable reason for this. If anyone has any insights as to the potential cause and/or solution to this we'd love to hear it. Below is the error log from chef-client.log:
[2015-03-26T23:20:31+00:00] INFO: Processing execute[resize2fs /dev/xvda1 2>/dev/null] action run (base::default line 26) [2015-03-26T23:20:31+00:00] INFO: execute[resize2fs /dev/xvda1 2>/dev/null] ran successfully [2015-03-26T23:20:31+00:00] INFO: Processing yum_package[git] action install (base::default line 29) [2015-03-26T23:20:34+00:00] INFO: Processing yum_package[htop] action install (base::default line 30) [2015-03-26T23:20:34+00:00] INFO: yum_package[htop] installing htop-1.0.1-2.3.amzn1 from amzn-main repository [2015-03-26T23:20:38+00:00] INFO: Processing directory[/var/builds/dependencies/] action create (base::common_dependencies line 9) [2015-03-26T23:20:38+00:00] INFO: directory[/var/builds/dependencies/] created directory /var/builds/dependencies/ [2015-03-26T23:20:38+00:00] INFO: Processing s3_file[/var/builds/dependencies/deploy_key] action create (base::common_dependencies line 14) [2015-03-26T23:20:38+00:00] INFO: Processing chef_gem[rest-client] action install (dynamically defined)
================================================================================ Error executing action `install` on resource 'chef_gem[rest-client]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------ Expected process to exit with [0], but received '1'
---- Begin output of /opt/chefdk/embedded/bin/gem install rest-client -q --no-rdoc --no-ri -v "1.8.0" ---- STDOUT: Successfully installed netrc-0.10.3 Building native extensions. This could take a while... STDERR: WARNING: You don't have /.chefdk/gem/ruby/2.1.0/bin in your PATH,
gem executables will not run. ERROR: Error installing rest-client:
ERROR: Failed to build gem native extension.
/opt/chefdk/embedded/bin/ruby -r ./siteconf20150326-4306-ptf6fb.rb extconf.rb checking for main() in -lstdc++... *** extconf.rb failed
*** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/opt/chefdk/embedded/bin/ruby
--with-stdc++lib
--without-stdc++lib /opt/chefdk/embedded/lib/ruby/2.1.0/mkmf.rb:467:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first.
from /opt/chefdk/embedded/lib/ruby/2.1.0/mkmf.rb:552:in `try_link0'
from /opt/chefdk/embedded/lib/ruby/2.1.0/mkmf.rb:567:in `try_link'
from /opt/chefdk/embedded/lib/ruby/2.1.0/mkmf.rb:753:in `try_func'
from /opt/chefdk/embedded/lib/ruby/2.1.0/mkmf.rb:984:in `block in have_library'
from /opt/chefdk/embedded/lib/ruby/2.1.0/mkmf.rb:929:in `block in checking_for'
from /opt/chefdk/embedded/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone'
from /opt/chefdk/embedded/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /opt/chefdk/embedded/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
from /opt/chefdk/embedded/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /opt/chefdk/embedded/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
from /opt/chefdk/embedded/lib/ruby/2.1.0/mkmf.rb:928:in `checking_for'
from /opt/chefdk/embedded/lib/ruby/2.1.0/mkmf.rb:979:in `have_library'
from extconf.rb:2:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /.chefdk/gem/ruby/2.1.0/gems/unf_ext-0.0.6 for inspection. Results logged to /.chefdk/gem/ruby/2.1.0/extensions/x86_64-linux/2.1.0/unf_ext-0.0.6/gem_make.out
---- End output of /opt/chefdk/embedded/bin/gem install rest-client -q --no-rdoc --no-ri -v "1.8.0" ---- Ran /opt/chefdk/embedded/bin/gem install rest-client -q --no-rdoc --no-ri -v "1.8.0" returned 1
Cookbook Trace:
--------------- /etc/chef/local-mode-cache/cache/cookbooks/s3_file/providers/default.rb:8:in `block in class_from_file'
Compiled Resource:
------------------
# Declared in
chef_gem("rest-client") do action :install retries 0 retry_delay 2 default_guard_interpreter :default package_name "rest-client" version "1.8.0" timeout 900 gem_binary "/opt/chefdk/embedded/bin/gem" end
The rubygem rest-client was updated recently:
1.8.0 - March 24, 2015 (122 KB)
This adds a dependency to http-cookie gem, which resolves in dependencies to domain_name, unf and unf_ext which needs a C++ compiler and libstdc++ (https://github.com/knu/ruby-unf_ext, Requirement)
For CentOS this means: yum install gcc-c++ libstdc++-devel
I created an issue on their bug tracker (https://github.com/rest-client/rest-client/issues/371)
I'm using a JRUBY/Cucumber/Watir framework and I have one specific features folder that keeps throwing this error every I try to use the built in HTML formatter:
uninitialized constant Syntax::Ruby::Set
Error creating formatter: html (NameError)
org/jruby/RubyModule.java:2690:in `const_missing'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/gems/syntax-1.2.0/lib/syntax /lang/ruby.rb:11:in `Ruby'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/gems/syntax-1.2.0/lib/syntax /lang/ruby.rb:8:in `Syntax'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/gems/syntax-1.2.0/lib/syntax/lang/ruby.rb:3:in `(root)'
org/jruby/RubyKernel.java:1083:in `require'
/Users/Casey.Guerrero/.rvm/rubies/jruby-1.7.10/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
/Users/Casey.Guerrero/.rvm/rubies/jruby-1.7.10/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/gems/syntax-1.2.0/lib/syntax.rb:1:in `(root)'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/gems/syntax-1.2.0/lib/syntax.rb:24:in `load'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/gems/syntax-1.2.0/lib/syntax/convertors/abstract.rb:16:in `for_syntax'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/gems/cucumber-1.3.14/bin/../lib/cucumber/formatter/html.rb:580:in `SnippetExtractor'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/gems/cucumber-1.3.14/bin/../lib/cucumber/formatter/html.rb:578:in `Html'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/gems/cucumber-1.3.14/bin/../lib/cucumber/formatter/html.rb:8:in `Formatter'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/gems/cucumber-1.3.14/bin/../lib/cucumber/formatter/html.rb:7:in `Cucumber'
org/jruby/RubyKernel.java:1083:in `require'
/Users/Casey.Guerrero/.rvm/rubies/jruby-1.7.10/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:55:in `require'
/Users/Casey.Guerrero/.rvm/rubies/jruby-1.7.10/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:53:in `require'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/gems/cucumber-1.3.14/bin/../lib/cucumber/formatter/html.rb:6:in `(root)'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/gems/cucumber-1.3.14/bin/../lib/cucumber/constantize.rb:1:in `(root)'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/gems/cucumber-1.3.14/bin/../lib/cucumber/constantize.rb:17:in `constantize'
org/jruby/RubyArray.java:2409:in `map'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/gems/cucumber-1.3.14/bin/../lib/cucumber/cli/configuration.rb:81:in `formatter_class'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/gems/cucumber-1.3.14/bin/../lib/cucumber/cli/configuration.rb:182:in `formatters'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/gems/cucumber-1.3.14/bin/../lib/cucumber/cli/configuration.rb:178:in `formatters'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/gems/cucumber-1.3.14/bin/../lib/cucumber/cli/configuration.rb:76:in `build_tree_walker'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/gems/cucumber-1.3.14/bin/../lib/cucumber/runtime.rb:46:in `run!'
org/jruby/RubyKernel.java:1099:in `load'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/gems/cucumber-1.3.14/bin/../lib/cucumber/cli/main.rb:47:in `execute!'
org/jruby/RubyKernel.java:1119:in `eval'
/Users/Casey.Guerrero/.rvm/gems/jruby-1.7.10/bin/jruby_executable_hooks:15:in `(root)'
Using cucumber-1.3.14 and jruby-1.7.10 , although the error occurs with jruby-1.7.4. There are no formatters included in the support directory or referenced anywhere in the env.rb. Not using rake or anything ust running individual features. The strange thing is that other feature folders can output html reports with the same command arguments as the one that fails. Example:
cucumber features/AddText.feature -f html -o report.html -f pretty
or
cucumber features/AddText.feature --format html --out report.html --format pretty
Any insight would be helpful.
UPDATE:
For some reason uninstalling then 'syntax' gem allows features to run and html reports to be generated. I was under the impression that 'syntax' was a 'cucumber' dependency...
When a test failure occurs in Cucumber, the following line is written to the console:
# gem install syntax to get syntax highlighting
Unfortunately, this causes people to install the syntax gem, which is the cause of your error.
Do 'gem uninstall syntax' or 'sudo gem uninstall syntax' to avoid this error.
Run "gem uninstall syntax" this will work
i know this is bit old thread, but would like to clear somethings out.
cucumber 1.3.17 and 1.3.18 dependent on syntax >= 1.0.0
and in the current case, problem is syntax 1.2.0 and not all version of syntax.
so what we should do is
uninstall syntax 1.2.0 and install syntax 1.0.0
sudo gem install syntax -v 1.0.0
I am getting following error..
RROR: Error installing calabash-cucumber:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for main() in -lc... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--with-gherkin_lexer_ar-dir
--without-gherkin_lexer_ar-dir
--with-gherkin_lexer_ar-include
--without-gherkin_lexer_ar-include=${gherkin_lexer_ar-dir}/include
--with-gherkin_lexer_ar-lib
--without-gherkin_lexer_ar-lib=${gherkin_lexer_ar-dir}/
--with-clib
--without-clib
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:430:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:509:in `block in try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tmpdir.rb:88:in `mktmpdir'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:506:in `try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:530:in `try_link'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:716:in `try_func'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:946:in `block in have_library'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:891:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:336:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:306:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:336:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:306:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:332:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:890:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:941:in `have_library'
from extconf.rb:5:in `<main>'
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/gherkin-2.12.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/gherkin-2.12.2/ext/gherkin_lexer_ar/gem_make.out
The telling line in the exception trace is this:
The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first.
From Terminal, run xcode-select --install to install the necessary tools and then give installing Cucumber another go.
I'm hoping someone knows the answer to this, I'm running Cucumber from IronRuby and getting an IKVM exception. Stack trace is at the bottom. RSpec works fine.
Any ideas?
can't convert Array into java::util::List (TypeError)
C:/Program Files/IronRuby 1.0v4/lib/ironruby/gems/1.8/gems/gherkin-2.1.5-universal-dotnet/lib/gherkin/native/ikvm.rb:37:in `new'
C:/Program Files/IronRuby 1.0v4/lib/ironruby/gems/1.8/gems/cucumber-0.8.5/bin/../lib/cucumber/cli/configuration.rb:29:in `parse!'
C:/Program Files/IronRuby 1.0v4/lib/ironruby/gems/1.8/gems/cucumber-0.8.5/bin/../lib/cucumber/cli/main.rb:78:in `configuration'
C:/Program Files/IronRuby 1.0v4/lib/ironruby/gems/1.8/gems/cucumber-0.8.5/bin/../lib/cucumber/cli/main.rb:43:in `execute!'
C:/Program Files/IronRuby 1.0v4/lib/ironruby/gems/1.8/gems/cucumber-0.8.5/bin/../lib/cucumber/cli/main.rb:25:in `execute'
C:/Program Files/IronRuby 1.0v4/lib/ironruby/gems/1.8/gems/cucumber-0.8.5/bin/cucumber:8
I saw your post in Github. Have you tried to use the newer version of Gherkin or downgrade to older dependency versions?