skoba / openehr-rails

Rails related openEHR extension
8 stars 5 forks source link

get error when import adl #24

Open foxzool opened 10 years ago

foxzool commented 10 years ago

I has been download the adl file from http://openehr.org/ckm/ into app/archetypes, but get error can't import the adl file

rails g openehr:scaffold app/archetypes/openEHR-EHR-OBSERVATION.blood_pressure.v1.adl
Expected [Rr] at line 1, column 2 (byte 2) after a
1
2
/Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/openehr-1.2.99/lib/openehr/parser/adl_parser.rb:39:in `archetype_id': undefined method `archetype_id' for nil:NilClass (NoMethodError)
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/openehr-1.2.99/lib/openehr/parser/adl_parser.rb:78:in `archetype'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/openehr-1.2.99/lib/openehr/parser/adl_parser.rb:17:in `parse'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/bundler/gems/openehr-rails-2d55d50201b9/lib/generators/openehr.rb:20:in `archetype'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/bundler/gems/openehr-rails-2d55d50201b9/lib/generators/openehr.rb:32:in `archetype_name'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/bundler/gems/openehr-rails-2d55d50201b9/lib/generators/openehr.rb:36:in `controller_name'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/bundler/gems/openehr-rails-2d55d50201b9/lib/generators/openehr.rb:40:in `controller_file_path'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/bundler/gems/openehr-rails-2d55d50201b9/lib/generators/openehr/scaffold/scaffold_generator.rb:19:in `create_root_folder'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/generators.rb:157:in `invoke'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/commands/generate.rb:11:in `<top (required)>'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `block in require'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:135:in `generate_or_destroy'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:51:in `generate'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/commands.rb:17:in `<top (required)>'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `block in require'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'
    from /Users/ZoOL/Projects/topdoctor/bin/rails:8:in `<top (required)>'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:241:in `load'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:241:in `block in load'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in `load_dependency'
    from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:241:in `load'
    from /Users/ZoOL/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/ZoOL/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from -e:1:in `<main>'
skoba commented 10 years ago

This looks a bug from openehr-ruby update. I am on research about this and much sorry to bother you.

skoba commented 10 years ago

This is a bug for current openehr-rails and openehr-ruby. ADL parser does not work well when it was imported. I am on research about this.

Shinji

2014-08-24 13:44 GMT+09:00 ZoOL notifications@github.com:

I has been download the adl file from http://openehr.org/ckm/ into app/archetypes, but get error can't import the adl file

rails g openehr:scaffold app/archetypes/openEHR-EHR-OBSERVATION.blood_pressure.v1.adl Expected [Rr] at line 1, column 2 (byte 2) after a 1 2 /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/openehr-1.2.99/lib/openehr/parser/adl_parser.rb:39:in archetype_id': undefined methodarchetype_id' for nil:NilClass (NoMethodError) from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/openehr-1.2.99/lib/openehr/parser/adl_parser.rb:78:in archetype' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/openehr-1.2.99/lib/openehr/parser/adl_parser.rb:17:inparse' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/bundler/gems/openehr-rails-2d55d50201b9/lib/generators/openehr.rb:20:in archetype' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/bundler/gems/openehr-rails-2d55d50201b9/lib/generators/openehr.rb:32:inarchetype_name' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/bundler/gems/openehr-rails-2d55d50201b9/lib/generators/openehr.rb:36:in controller_name' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/bundler/gems/openehr-rails-2d55d50201b9/lib/generators/openehr.rb:40:incontroller_file_path' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/bundler/gems/openehr-rails-2d55d50201b9/lib/generators/openehr/scaffold/scaffold_generator.rb:19:in create_root_folder' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/command.rb:27:inrun' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/invocation.rb:126:in invoke_command' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/invocation.rb:133:inblock in invoke_all' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/invocation.rb:133:in each' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/invocation.rb:133:inmap' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/invocation.rb:133:in invoke_all' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/group.rb:232:indispatch' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/base.rb:440:in start' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/generators.rb:157:ininvoke' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/commands/generate.rb:11:in <top (required)>' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:inrequire' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in block in require' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:inload_dependency' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in require' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:135:ingenerate_or_destroy' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:51:in generate' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/commands/commands_tasks.rb:40:inrun_command!' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/railties-4.1.5/lib/rails/commands.rb:17:in <top (required)>' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:inrequire' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in block in require' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:inload_dependency' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in require' from /Users/ZoOL/Projects/topdoctor/bin/rails:8:in<top (required)>' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:241:in load' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:241:inblock in load' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:232:in load_dependency' from /Users/ZoOL/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:241:inload' from /Users/ZoOL/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in require' from /Users/ZoOL/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from -e:1:in `

'

— Reply to this email directly or view it on GitHub https://github.com/skoba/openehr-rails/issues/24.