Open matenia opened 13 years ago
I'm having the same exact issue. I am using RVM with ruby 1.9.2p136 and Rails 3.0.4.
Yeah I've tried doing a few things but no such luck as yet. Hopefully I will have an epiphany and get the answer ... Please keep me updated if you have any luck.
This happens if you try to run the themed generator on a controller that doesn't have an associated model.
Try passing the --themed_type=text argument to the generator, and it will generate a show view and _sidebar partial, instead of the CRUD views that are created normally.
Ah ... thanks for this. Greatly appreciated. :)
i'm experiencing this issue as well.
My model is: Backend::Lead My Controller is: Backend::LeadsController
When running:
$ rails g web_app_theme:themed backend/leads backend/lead --engine=haml
I get the following trace: /Users/Theodor/.rvm/gems/ruby-1.9.2-p180@yenka-signup/gems/web-app-theme-0.7.0/lib/generators/web_app_theme/themed/themed_generator.rb:80:in `const_get': wrong constant name Backend::Lead (NameError)
Although Backend::Lead is defined in my class code.
Running $ rails g web_app_theme:themed backend/leads --engine=haml
Gives me the following: ...wrong constant name Kernel::Lead (NameError)
Hi, Just had a weird error whilst trying to use the themed generator to get my scaffold looking fantastic of course.
$rails g web_app_theme:themed admin/pages --layout=admin /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/web-app-theme-0.6.3/lib/generators/web_app_theme/themed/themed_generator.rb:80:in
const_get': uninitialized constant Kernel::Page (NameError) from /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/web-app-theme-0.6.3/lib/generators/web_app_theme/themed/themed_generator.rb:80:in
columns' from (erb):11:intemplate' from (eval):1:in
template' from /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/web-app-theme-0.6.3/lib/generators/web_app_theme/themed/themed_generator.rb:116:ingenerate_erb_views' from /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/web-app-theme-0.6.3/lib/generators/web_app_theme/themed/themed_generator.rb:115:in
each' from /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/web-app-theme-0.6.3/lib/generators/web_app_theme/themed/themed_generator.rb:115:ingenerate_erb_views' from /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/web-app-theme-0.6.3/lib/generators/web_app_theme/themed/themed_generator.rb:111:in
generate_views' from /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/web-app-theme-0.6.3/lib/generators/web_app_theme/themed/themed_generator.rb:21:incopy_views' from /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/thor-0.14.6/lib/thor/task.rb:22:in
send' from /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/thor-0.14.6/lib/thor/task.rb:22:inrun' from /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/thor-0.14.6/lib/thor/invocation.rb:118:in
invoke_task' from /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/thor-0.14.6/lib/thor/invocation.rb:124:ininvoke_all' from /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/thor-0.14.6/lib/thor/shell.rb:14:in
map' from /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/thor-0.14.6/lib/thor/core_ext/ordered_hash.rb:73:ineach' from /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/thor-0.14.6/lib/thor/invocation.rb:124:in
map' from /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/thor-0.14.6/lib/thor/invocation.rb:124:ininvoke_all' from /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/thor-0.14.6/lib/thor/group.rb:226:in
dispatch' from /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/thor-0.14.6/lib/thor/base.rb:389:instart' from /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/railties-3.0.3/lib/rails/generators.rb:163:in
invoke' from /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/railties-3.0.3/lib/rails/commands/generate.rb:10 from /Users/matenia/.rvm/gems/ruby-1.8.7-p302@rails3/gems/railties-3.0.3/lib/rails/commands.rb:17 from script/rails:6:in `require' from script/rails:6My scaffold is nested under admin and works ok. Is there maybe something I have done wrong? Any help would be greatly appreciated.