lucasefe / themes_for_rails

Theme Support for Rails 3
This very same page :)
MIT License
308 stars 102 forks source link

undefined method `theme' in controllers #51

Closed rathgar closed 12 years ago

rathgar commented 12 years ago

When running v0.5.0 under:

ruby 1.9.3 rails 3.2.3

I realise Rails 3.2.2 might not be technically supported yet but thought I should mention it as reverting to v0.4.3 works ok for now.

lucasefe commented 12 years ago

Hey, @rathgar

I'm using the current release (0.5.0) under the same environment and it works just fine. As far as I know, nothing major changed (just the mass assignment stuff) from 3.2.2 to 3.2.3.

Can you provide a complete backtrace?

Did you checked the upgrade notes on the wiki?

rathgar commented 12 years ago

Thanks for that @lucasefe, I looked at the wiki but could spot any upgrade notes in there.

I must be missing them, can you link to them and I'll go through it fully and let you know.

lucasefe commented 12 years ago

Here's some data about the current configuration:

https://github.com/lucasefe/themes_for_rails/wiki/Usage https://github.com/lucasefe/themes_for_rails/wiki/Configuration https://github.com/lucasefe/themes_for_rails/wiki/Assets-Pipeline-Integration

Also, you did not provide a backtrace.

rathgar commented 12 years ago

I managed to get it running again by removing all traces of it including gem caches and re-running bundle install. Must have been a dodgy update, but was happening on more than one setup. If it crops up again I'll let you know. Thanks for pointers.

danajanssen commented 12 years ago

I'm going to comment on this issue because I also experienced this problem. Rails 3.2.3 / Ruby 1.9.2. It happens only when trying to assign theme in ApplicationController. It does not happen if I call theme from another controller. I can work around it by manually including ThemesForRails::ActionController at the top of ApplicationController, or by loading the theme in a before_filter. Not sure which is best, but it's working, so I am happy. Great gem :)

jayroh commented 12 years ago

@danajanssen's edge-case just bit me as well. Might be worthwhile to add that solution in the Usage/Configuration doc(s).

laucb commented 12 years ago

I have the same problem using: rails 3.2.6 jruby 1.6.7.2 (ruby-1.9.2-p312) themes_for_rails 0.5.0 or 0.5.1