[
https://issues.apache.org/jira/browse/DTACLOUD-420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13561552#comment-13561552
]
Christian Karnath commented on DTACLOUD-420:
--------------------------------------------
>> ruby --version
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]
>> curl -k -X POST -F "name=newNewInstance" -F "hwp_id=m1-small" -F
>> "image_id=img1" --user "un:pw" "localhost:3001/api/instances?
format=json"
{"code":500,"message":"undefined method `write' for
#<Syck::Emitter:0x0000000396bba0>","error":"NoMethodError"}
After setting the following RUBYOPT environment variable as a workaround,
everything works fine:
RUBYOPT='-rpsych' bundle install
It seems to be a ruby 1.9.2 related issue with YAML parsing:
- http://excid3.com/blog/undefined-method-write-for-syckemitter/#.UQEPSifaXld
- http://stackoverflow.com/questions/7015414/error-while-running-metrical
> Mock: Exception is thrown when creating a new instance
> ------------------------------------------------------
>
> Key: DTACLOUD-420
> URL: https://issues.apache.org/jira/browse/DTACLOUD-420
> Project: DeltaCloud
> Issue Type: Bug
> Components: Server
> Environment: Debian 6.0.6, ruby 1.9.2p0, deltacloud development
> Reporter: Christian Karnath
> Assignee: Marios Andreou
>
> The following exception is thrown when creating a new instance against the
> mock driver:
> E, [2013-01-15T20:46:23.497506 #23978] ERROR -- 500: [NoMethodError]
> undefined method `write' for #<Syck::Emitter:0x00000003970ee8>
> /usr/lib/ruby/1.9.1/psych/visitors/emitter.rb:17:in `end_document'
> /usr/lib/ruby/1.9.1/psych/visitors/emitter.rb:17:in
> `visit_Psych_Nodes_Document'
> /usr/lib/ruby/1.9.1/psych/visitors/visitor.rb:10:in `accept'
> /usr/lib/ruby/1.9.1/psych/visitors/emitter.rb:10:in `block in
> visit_Psych_Nodes_Stream'
> /usr/lib/ruby/1.9.1/psych/visitors/emitter.rb:10:in `each'
> /usr/lib/ruby/1.9.1/psych/visitors/emitter.rb:10:in `visit_Psych_Nodes_Stream'
> /usr/lib/ruby/1.9.1/psych/visitors/visitor.rb:11:in `accept'
> /usr/lib/ruby/1.9.1/psych/nodes/node.rb:36:in `to_yaml'
> /usr/lib/ruby/1.9.1/psych.rb:166:in `dump'
> /usr/lib/ruby/1.9.1/psych/core_ext.rb:13:in `psych_to_yaml'
> /usr/lib/ruby/1.9.1/syck/rubytypes.rb:114:in `node_export'
> /usr/lib/ruby/1.9.1/syck/rubytypes.rb:114:in `add'
> /usr/lib/ruby/1.9.1/syck/rubytypes.rb:114:in `block (3 levels) in to_yaml'
> /usr/lib/ruby/1.9.1/syck/rubytypes.rb:113:in `each'
> /usr/lib/ruby/1.9.1/syck/rubytypes.rb:113:in `block (2 levels) in to_yaml'
> /usr/lib/ruby/1.9.1/syck/rubytypes.rb:112:in `seq'
> /usr/lib/ruby/1.9.1/syck/rubytypes.rb:112:in `block in to_yaml'
> /usr/lib/ruby/1.9.1/syck.rb:401:in `call'
> /usr/lib/ruby/1.9.1/syck.rb:401:in `emit'
> /usr/lib/ruby/1.9.1/syck.rb:401:in `quick_emit'
> /usr/lib/ruby/1.9.1/syck/rubytypes.rb:111:in `to_yaml'
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira