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

Already on GitHub? Sign in to your account

Error trying to compile ya2yaml.rb #240

Closed
bkb opened this Issue Apr 1, 2010 · 3 comments

Comments

Projects
None yet
3 participants

bkb commented Apr 1, 2010

ya2yaml gem 0.26
rubinius 1.0.0-rc4 (1.8.7 3fbdc2f 2010-03-31 JI) [x86_64-apple-darwin10.3.0]

When running 'rake gems' on a rails app with ya2yaml required in a rake task.
rake aborted!

Error trying to compile /rubinius/rubinius/gems/1.8/gems/ya2yaml-0.26/lib/ya2yaml.rb
lib/compiler/compiler.rb:11:in `compiler_error'
lib/compiler/compiler.rb:64:in `compile_file'
lib/compiler/compiler.rb:47:in `compile_file_old'
kernel/delta/requirer.rb:217:in `single_load {}'
kernel/delta/requirer.rb:158:in `compile_feature'
kernel/delta/requirer.rb:216:in `single_load'
kernel/delta/requirer.rb:140:in `unified_load {}'
kernel/bootstrap/array.rb:156:in `each'
kernel/delta/requirer.rb:105:in `unified_load'
kernel/common/kernel.rb:747:in `gem_original_require (require)'
/rubinius/rubinius/lib/rubygems/custom_require.rb:40:in `require'
/rubinius/rubinius/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require {}'
/rubinius/rubinius/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in'
/rubinius/rubinius/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
/chumby/www/lib/tasks/i18n.rake:2:in `__script__'
kernel/common/compiled_method.rb:242:in `as_script'
kernel/delta/requirer.rb:267:in `single_load'
kernel/delta/requirer.rb:98:in `unified_load'
kernel/common/kernel.rb:697:in `load_without_new_constant_marking (load)'
/rubinius/rubinius/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:145:in `load_with_new_constant_marking {}'
/rubinius/rubinius/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in'
/rubinius/rubinius/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:145:in `load (load_with_new_constant_marking)'
/rubinius/rubinius/gems/1.8/gems/rails-2.3.4/lib/tasks/rails.rb:8:in `__script__ {}'
kernel/bootstrap/array.rb:156:in `each'
/rubinius/rubinius/gems/1.8/gems/rails-2.3.4/lib/tasks/rails.rb:8:in `__script__'
kernel/common/compiled_method.rb:242:in `as_script'
kernel/delta/requirer.rb:267:in `single_load'
kernel/delta/requirer.rb:140:in `unified_load {}'
kernel/bootstrap/array.rb:156:in `each'
kernel/delta/requirer.rb:105:in `unified_load'
kernel/common/kernel.rb:747:in `gem_original_require (require)'
/rubinius/rubinius/lib/rubygems/custom_require.rb:31:in `require'
/chumby/www/rakefile:10:in `__script__'
kernel/common/compiled_method.rb:242:in `as_script'
kernel/delta/requirer.rb:267:in `single_load'
kernel/delta/requirer.rb:98:in `unified_load'
kernel/common/kernel.rb:697:in `load'
/rubinius/rubinius/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile'
/rubinius/rubinius/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in `load_rakefile {}'
/rubinius/rubinius/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/rubinius/rubinius/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile'
/rubinius/rubinius/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run {}'
/rubinius/rubinius/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/rubinius/rubinius/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/rubinius/rubinius/gems/1.8/gems/rake-0.8.7/bin/rake:31:in `__script__'
kernel/common/compiled_method.rb:242:in `as_script'
kernel/delta/requirer.rb:267:in `single_load'
kernel/delta/requirer.rb:98:in `unified_load'
kernel/common/kernel.rb:697:in `load'
/usr/local/bin/rbxrake:19:in `__script__'
kernel/common/compiled_method.rb:242:in `as_script'
kernel/delta/requirer.rb:267:in `single_load'
kernel/delta/requirer.rb:352:in `load_from_extension'
kernel/loader.rb:417:in `script'
kernel/loader.rb:528:in `main'
kernel/loader.rb:533:in `__script__'
Owner

dbussink commented Apr 19, 2010

Ok, abstract this problem into a smaller problem by having a case construct inside the else in a case construct:

def some_method(obj)

  case obj
    when Array
      puts "Array"
    else
      case
        when Integer
          puts "Integer"
      end
  end
end

p some_method(Array.new)
Owner

evanphx commented Apr 19, 2010

Process the else of a case properly. Closed by c4e59e7.

bkb commented Apr 20, 2010

Awesome, works for me. I can now run a local copy of my employer's site on rbx. Great project!

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment