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

rails 31 error? #2

Open
saranyan opened this issue Dec 14, 2011 · 7 comments
Open

rails 31 error? #2

saranyan opened this issue Dec 14, 2011 · 7 comments

Comments

@saranyan
Copy link

Hey, I was trying this gem out. Is the error 31 specific? Thanks. :)

bundle exec rake wadlgen
rake aborted!
wrong constant name _controller

Tasks: TOP => wadlgen
(See full trace by running task with --trace)

@saranyan
Copy link
Author

The full trace, if that is helpful.

Tasks: TOP => wadlgen
(See full trace by running task with --trace)
LM-AUN-00712319:milo_test svigraham$ bundle exec rake wadlgen --trace
** Invoke wadlgen (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute wadlgen
rake aborted!
wrong constant name _controller
/Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/bundler/gems/wadlgen-b4e7f9a10454/lib/wadlgen/route_parser.rb:59:in const_get' /Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/bundler/gems/wadlgen-b4e7f9a10454/lib/wadlgen/route_parser.rb:59:inget_representations'
/Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/bundler/gems/wadlgen-b4e7f9a10454/lib/wadlgen/route_parser.rb:38:in block in get_route_structure' /Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/bundler/gems/wadlgen-b4e7f9a10454/lib/wadlgen/route_parser.rb:22:ineach'
/Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/bundler/gems/wadlgen-b4e7f9a10454/lib/wadlgen/route_parser.rb:22:in get_route_structure' /Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/bundler/gems/wadlgen-b4e7f9a10454/lib/wadlgen/route_parser.rb:13:inparse'
/Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/bundler/gems/wadlgen-b4e7f9a10454/lib/wadlgen.rb:37:in parse_route' /Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/bundler/gems/wadlgen-b4e7f9a10454/lib/wadlgen.rb:18:ingenerate'
/Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/bundler/gems/wadlgen-b4e7f9a10454/lib/rake/wadlgen.rb:19:in block in <top (required)>' /Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/gems/rake-0.9.2.2/lib/rake/task.rb:205:incall'
/Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/gems/rake-0.9.2.2/lib/rake/task.rb:205:in block in execute' /Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/gems/rake-0.9.2.2/lib/rake/task.rb:200:ineach'
/Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/gems/rake-0.9.2.2/lib/rake/task.rb:200:in execute' /Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/gems/rake-0.9.2.2/lib/rake/task.rb:158:inblock in invoke_with_call_chain'
/Users/svigraham/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in mon_synchronize' /Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/gems/rake-0.9.2.2/lib/rake/task.rb:151:ininvoke_with_call_chain'
/Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/gems/rake-0.9.2.2/lib/rake/task.rb:144:in invoke' /Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/gems/rake-0.9.2.2/lib/rake/application.rb:116:ininvoke_task'
/Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/gems/rake-0.9.2.2/lib/rake/application.rb:94:in block (2 levels) in top_level' /Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/gems/rake-0.9.2.2/lib/rake/application.rb:94:ineach'
/Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/gems/rake-0.9.2.2/lib/rake/application.rb:94:in block in top_level' /Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/gems/rake-0.9.2.2/lib/rake/application.rb:133:instandard_exception_handling'
/Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/gems/rake-0.9.2.2/lib/rake/application.rb:88:in top_level' /Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/gems/rake-0.9.2.2/lib/rake/application.rb:66:inblock in run'
/Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/gems/rake-0.9.2.2/lib/rake/application.rb:133:in standard_exception_handling' /Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/gems/rake-0.9.2.2/lib/rake/application.rb:63:inrun'
/Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/gems/rake-0.9.2.2/bin/rake:33:in <top (required)>' /Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/bin/rake:19:inload'
/Users/svigraham/.rvm/gems/ruby-1.9.2-p290@rails31/bin/rake:19:in `

'
Tasks: TOP => wadlgen

@austvik
Copy link
Owner

austvik commented Dec 14, 2011

Hmm, it seems it is not able to read the controller name in this code:

  application.routes.routes.each do |route|
    defaults = route.defaults
    controller = defaults[:controller]

A prettyprint of defaults there where it crashes would be interesting.

@jgifford78
Copy link

I ran into the same error. As I trace down through, it seems that the base variable in the rake task might be the issue. Or rather, incorrectly setting a base in the routes.rb file?

@austvik
Copy link
Owner

austvik commented Mar 9, 2012

Are any of these projects by any chance open source so that I can try to reproduce myself?

@jgifford78
Copy link

Mine isn't, but I can try and reproduce it on a project that is. If I'm able to, I'll send it back your way. Thanks.

@jgifford78
Copy link

I added wadlgen to a public application. jgifford78\ScoutMaster-Tools

@ygoldshtrakh
Copy link

it has to do with an empty defaults. i've submitted a pull request to have it checked

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

4 participants