きゅうりのテストをPDF形式で出力しようとしています。私はしばらくこれをやっていて、それはうまくいきました。いくつかの宝石をアップグレードした後、私のpdf出力はエラーで動作を停止しました:
% rake cucumber:new_report_pdf
(in /home/map7/pais)
NOTICE: CREATE TABLE will create implicit sequence "employees_id_seq" for serial column "employees.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "employees_pkey" for table "employees"
NOTICE: CREATE TABLE will create implicit sequence "entities_id_seq" for serial column "entities.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "entities_pkey" for table "entities"
NOTICE: CREATE TABLE will create implicit sequence "ledgers_id_seq" for serial column "ledgers.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "ledgers_pkey" for table "ledgers"
NOTICE: CREATE TABLE will create implicit sequence "staff_id_seq" for serial column "staff.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "staff_pkey" for table "staff"
bundle exec /home/map7/.rvm/rubies/ruby-1.9.2-p180/bin/ruby -I "/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib:lib" "/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/bin/cucumber" --profile new_report_pdf
Using the new_report_pdf profile...
..........undefined method `headers=' for #<Prawn::Table:0x0000000697d4d8> (NoMethodError)
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/prawn-0.11.1/lib/prawn/table.rb:124:in `block in initialize'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/prawn-0.11.1/lib/prawn/table.rb:124:in `each'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/prawn-0.11.1/lib/prawn/table.rb:124:in `initialize'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/prawn-0.11.1/lib/prawn/table.rb:25:in `new'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/prawn-0.11.1/lib/prawn/table.rb:25:in `table'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/formatter/pdf.rb:240:in `print_table'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/formatter/pdf.rb:161:in `block in before_multiline_arg'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/formatter/pdf.rb:219:in `call'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/formatter/pdf.rb:219:in `block in render'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/formatter/pdf.rb:218:in `each'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/formatter/pdf.rb:218:in `render'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/formatter/pdf.rb:229:in `flush'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/formatter/pdf.rb:105:in `after_feature_element'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/ast/tree_walker.rb:174:in `block in send_to_all'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/ast/tree_walker.rb:172:in `each'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/ast/tree_walker.rb:172:in `send_to_all'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/ast/tree_walker.rb:165:in `broadcast'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/ast/tree_walker.rb:50:in `visit_feature_element'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/ast/feature.rb:40:in `block in accept'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/ast/feature.rb:39:in `each'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/ast/feature.rb:39:in `accept'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/ast/tree_walker.rb:20:in `block in visit_feature'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/ast/tree_walker.rb:164:in `broadcast'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/ast/tree_walker.rb:19:in `visit_feature'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/ast/features.rb:29:in `block in accept'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/ast/features.rb:17:in `each'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/ast/features.rb:17:in `each'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/ast/features.rb:28:in `accept'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/ast/tree_walker.rb:14:in `block in visit_features'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/ast/tree_walker.rb:164:in `broadcast'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/ast/tree_walker.rb:13:in `visit_features'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/runtime.rb:45:in `run!'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/cli/main.rb:43:in `execute!'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/lib/cucumber/cli/main.rb:20:in `execute'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-0.10.2/bin/cucumber:14:in `<main>'
rake aborted!
Command failed with status (1): [bundle exec /home/map7/.rvm/rubies/ruby-1....]
(See full trace by running task with --trace)
これが私のcucumber.ymlファイルです
<%
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} --strict --tags ~@wip"
%>
default: <%= std_opts %> features
wip: --tags @wip:3 --wip features
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
report: --format html --out=features.html
report_pdf: --format pdf --out=features.pdf
new: --tags @new
new_report: --format html --out=features_new.html --tags @new
new_report_pdf: --format pdf --out=features_new.pdf --tags @new
きゅうりをアップグレードする必要がありますか?またはエビか何かをダウングレードしますか?
更新:Gemfileと実行中のバンドルで最新のキュウリとエビのgitリポジトリ(2011年5月24日)を使用してみました。私はまだ同じ問題を抱えています。
更新:(18/07/2011)take_tkのアドバイスに従い、$gemを使用した後uninstallprawn --version = 0.11.1
もう少し先に進みましたが、まだ問題があります。
..rake aborted!
Command failed with status (1): [/home/map7/.rvm/rubies/ruby-1.9.2-p180/bin...]
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/file_utils.rb:45:in `call'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/file_utils.rb:45:in `sh'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/file_utils_ext.rb:36:in `sh'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-1.0.0/lib/cucumber/rake/task.rb:104:in `run'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/cucumber-1.0.0/lib/cucumber/rake/task.rb:193:in `block in define_task'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/map7/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in run'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/home/map7/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/home/map7/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `load'
/home/map7/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `<main>'
Tasks: TOP => cucumber:new_report_pdf