kristianmandrup/cantango — Issue #20: Problems with jruby 1.6.5
Author: asdavey
Created: 2012-02-06 12:55:43+00:00
State: open

There appears to be a problem running the cantango install generator with Rails 3.1.0 and JRuby 1.6.5. When you run ```rails g cantango:install``` an error occurs. I got the same error on both Ubuntu and WIndows 7. I've included steps to reproduce for Ubuntu.

**Steps to Reproduce**

1. ```rvm install jruby-1.6.5```
1. ```rvm gemset create rails310```
1. ```rvm use jruby-1.6.5@rails310```
1. ```export JRUBY_OPTS=--1.9```
1. Run ```jruby -v```, and the version should return ```jruby 1.6.5 (ruby-1.9.2-p136)```
1. ```gem install rails -v 3.1.0```
1. ```rails new test_app```
1. ```cd test_app```
1. Add "gem 'cantango'" to Gemfile
1. ```bundle install```
1. ```rails g cantango:install```

**What I expected to happen**

I expected that a cantango.rb file would be generated in the config/initializers folder.

**What happened instead**

Instead I got the following error message:

```ruby
TypeError: is not a class/module
engines at (eval):3
Configuration at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/cantango-0.9.4.7/lib/cantango/configuration.rb:66
CanTango at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/cantango-0.9.4.7/lib/cantango/configuration.rb:5
(root) at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/cantango-0.9.4.7/lib/cantango/configuration.rb:4
configure at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/cantango-0.9.4.7/lib/cantango/configuration.rb:22
included at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/cantango-0.9.4.7/lib/cantango/rules/dsl.rb:5
include at org/jruby/RubyModule.java:2083
Rules at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/cantango-0.9.4.7/lib/cantango/rules.rb:5
CanTango at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/cantango-0.9.4.7/lib/cantango/rules.rb:2
(root) at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/cantango-0.9.4.7/lib/cantango/rules.rb:1
Permit at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/cantango-0.9.4.7/lib/cantango/rules.rb:9
Permits at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/cantango-0.9.4.7/lib/cantango/permits/permit.rb:5
CanTango at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/cantango-0.9.4.7/lib/cantango/permits/permit.rb:4
(root) at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/cantango-0.9.4.7/lib/cantango/permits/permit.rb:3
(root) at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/cantango-0.9.4.7/lib/cantango/permits/permit.rb:1
eval at org/jruby/RubyKernel.java:1093
(root) at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/cantango-0.9.4.7/lib/cantango/api/aliases.rb:2
each at org/jruby/RubyArray.java:1612
(root) at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/cantango-0.9.4.7/lib/cantango/api/aliases.rb:1
require at org/jruby/RubyKernel.java:1047
require at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240
load_dependency at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223
new_constants_in at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:640
new_constants_in at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:639
load_dependency at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223
require at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240
(root) at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/cantango-0.9.4.7/lib/cantango/api/aliases.rb:67
require at org/jruby/RubyKernel.java:1047
require at /home/Andrew/.rvm/gems/jruby-1.6.5@rails310/gems/cantango-0.9.4.7/lib/cantango.rb:68
each at org/jruby/RubyArray.java:1612
require at /home/Andrew/.rvm/gems/jruby-1.6.5@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:66
each at org/jruby/RubyArray.java:1612
require at /home/Andrew/.rvm/gems/jruby-1.6.5@global/gems/bundler-1.0.21/lib/bundler/runtime.rb:55
require at /home/Andrew/.rvm/gems/jruby-1.6.5@global/gems/bundler-1.0.21/lib/bundler.rb:122
(root) at /mnt/sitelink.web.portal/test_app2/config/application.rb:7
require at org/jruby/RubyKernel.java:1047
(root) at /mnt/sitelink.web.portal/test_app2/config/application.rb:21
require at org/jruby/RubyKernel.java:1047
(root) at script/rails:6
```