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
rvm install jruby-1.6.5
rvm gemset create rails310
rvm use jruby-1.6.5@rails310
export JRUBY_OPTS=--1.9
- Run
jruby -v, and the version should return jruby 1.6.5 (ruby-1.9.2-p136)
gem install rails -v 3.1.0
rails new test_app
cd test_app
- Add "gem 'cantango'" to Gemfile
bundle install
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:
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
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:installan error occurs. I got the same error on both Ubuntu and WIndows 7. I've included steps to reproduce for Ubuntu.Steps to Reproduce
rvm install jruby-1.6.5rvm gemset create rails310rvm use jruby-1.6.5@rails310export JRUBY_OPTS=--1.9jruby -v, and the version should returnjruby 1.6.5 (ruby-1.9.2-p136)gem install rails -v 3.1.0rails new test_appcd test_appbundle installrails g cantango:installWhat 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: