tscolari/mobylette — pull request #36 by leogavidia (2013-09-29 17:38:48+00:00)
Title: replaced @@mobylette_options by self.mobylette_options.

It fixes NoMethodError undefined method `[]' for nil:NilClass

I've always had this problem in JRuby. I used to solve it adding in my controller:

self.mobylette_options ||= {}

after

include Mobylette::RespondToMobileRequests

and adding again a configuration

mobylette_config do |config|
config[:mobile_user_agents] = proc { %r{iphone|android}i }
config[:fallback_chains] = { mobile: [:mobile, :html] }
config[:skip_user_agents] = []
end