Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dump/load doesn't work with JRuby 1.6.8 #43

Open
ytaras opened this issue Dec 10, 2012 · 0 comments
Open

Dump/load doesn't work with JRuby 1.6.8 #43

ytaras opened this issue Dec 10, 2012 · 0 comments

Comments

@ytaras
Copy link

ytaras commented Dec 10, 2012

If I'm trying to load a dump with yaml_db, I see following message:

➜ rake db:data:dump && rake db:data:load --trace
** Invoke db:data:load (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:data:load
rake aborted!
/home/ytaras/projects/RLM/perforce/brpm/hotfix/2.6-D/Portal/db/data.yml: couldn't parse YAML at line 16 column 2
org/jruby/ext/psych/PsychParser.java:270:in `parse'
/home/ytaras/.rvm/rubies/jruby-1.6.8/lib/ruby/1.9/psych.rb:148:in `parse_stream'
/home/ytaras/.rvm/rubies/jruby-1.6.8/lib/ruby/1.9/psych.rb:198:in `load_stream'
/home/ytaras/.rvm/rubies/jruby-1.6.8/lib/ruby/1.9/psych/deprecated.rb:28:in `load_documents'
/home/ytaras/.rvm/gems/jruby-1.6.8/gems/yaml_db-0.2.3/lib/yaml_db.rb:60:in `load_documents'
/home/ytaras/.rvm/gems/jruby-1.6.8/gems/yaml_db-0.2.3/lib/serialization_helper.rb:57:in `load'
/home/ytaras/.rvm/gems/jruby-1.6.8/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/home/ytaras/.rvm/gems/jruby-1.6.8/gems/yaml_db-0.2.3/lib/serialization_helper.rb:56:in `load'
/home/ytaras/.rvm/gems/jruby-1.6.8/gems/yaml_db-0.2.3/lib/serialization_helper.rb:31:in `load'
/home/ytaras/.rvm/gems/jruby-1.6.8/gems/yaml_db-0.2.3/lib/tasks/yaml_db_tasks.rake:35:in `(root)'
org/jruby/RubyProc.java:258:in `call'
/home/ytaras/.rvm/gems/jruby-1.6.8@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `execute'
org/jruby/RubyArray.java:1620:in `each'
/home/ytaras/.rvm/gems/jruby-1.6.8@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/ytaras/.rvm/gems/jruby-1.6.8@global/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/home/ytaras/.rvm/rubies/jruby-1.6.8/lib/ruby/1.9/monitor.rb:201:in `mon_synchronize'
/home/ytaras/.rvm/gems/jruby-1.6.8@global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/ytaras/.rvm/gems/jruby-1.6.8@global/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/ytaras/.rvm/gems/jruby-1.6.8@global/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/home/ytaras/.rvm/gems/jruby-1.6.8@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
org/jruby/RubyArray.java:1620:in `each'
/home/ytaras/.rvm/gems/jruby-1.6.8@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/home/ytaras/.rvm/gems/jruby-1.6.8@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/ytaras/.rvm/gems/jruby-1.6.8@global/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/ytaras/.rvm/gems/jruby-1.6.8@global/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run'
/home/ytaras/.rvm/gems/jruby-1.6.8@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/ytaras/.rvm/gems/jruby-1.6.8@global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/ytaras/.rvm/gems/jruby-1.6.8@global/gems/rake-0.9.2.2/bin/rake:33:in `(root)'
org/jruby/RubyKernel.java:1097:in `load'
/home/ytaras/.rvm/gems/jruby-1.6.8@global/gems/rake-0.9.2.2/bin/rake:19:in `'
org/jruby/RubyKernel.java:1117:in `eval'
/home/ytaras/.rvm/gems/jruby-1.6.8/bin/ruby_noexec_wrapper:14:in `(root)'
Tasks: TOP => db:data:load
➜ ruby -v
jruby 1.6.8 (ruby-1.9.2-p312) (2012-09-18 1772b40) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_32) [linux-amd64-java]

Here's the beginning of a file:

➜ head db/data.yml -n 16

---
activity_attributes:
  columns:
  - id
  - name
  - required
  - input_type
  - attribute_values
  - created_at
  - updated_at
  - from_system
  - type
  - field
  - list_id
...

Looks like psych doesn't understand three dots (...) sequence - and I'm not able to switch to sych as it's not supported in JRuby 1.6.8, 1.9 source mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant