{"action":"created","issue":{"url":"https://api.github.com/repos/metaskills/less-rails/issues/112","labels_url":"https://api.github.com/repos/metaskills/less-rails/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/metaskills/less-rails/issues/112/comments","events_url":"https://api.github.com/repos/metaskills/less-rails/issues/112/events","html_url":"https://github.com/metaskills/less-rails/pull/112","id":123069566,"number":112,"title":"Fix Undefined MethodError at app.assets.register_preprocessor for sprockets3","user":{"login":"suzan2go","id":8841470,"avatar_url":"https://avatars.githubusercontent.com/u/8841470?v=3","gravatar_id":"","url":"https://api.github.com/users/suzan2go","html_url":"https://github.com/suzan2go","followers_url":"https://api.github.com/users/suzan2go/followers","following_url":"https://api.github.com/users/suzan2go/following{/other_user}","gists_url":"https://api.github.com/users/suzan2go/gists{/gist_id}","starred_url":"https://api.github.com/users/suzan2go/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suzan2go/subscriptions","organizations_url":"https://api.github.com/users/suzan2go/orgs","repos_url":"https://api.github.com/users/suzan2go/repos","events_url":"https://api.github.com/users/suzan2go/events{/privacy}","received_events_url":"https://api.github.com/users/suzan2go/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-12-19T07:37:04Z","updated_at":"2016-01-09T22:12:22Z","closed_at":"2015-12-29T10:18:05Z","pull_request":{"url":"https://api.github.com/repos/metaskills/less-rails/pulls/112","html_url":"https://github.com/metaskills/less-rails/pull/112","diff_url":"https://github.com/metaskills/less-rails/pull/112.diff","patch_url":"https://github.com/metaskills/less-rails/pull/112.patch"},"body":"With  Rails 4.2.5, I got an error below ( at `rails c` and `rails s`).\r\n\r\n```\r\n/Users/suzuken/Documents/suzan2go/nasulog/vendor/bundle/ruby/2.2.0/gems/less-rails-2.7.0/lib/less/rails/railtie.rb:19:in `block in <class:Railtie>': undefined method `register_preprocessor' for nil:NilClass (NoMethodError)\r\n\tfrom /Users/suzuken/Documents/suzan2go/nasulog/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'\r\n\tfrom /Users/suzuken/Documents/suzan2go/nasulog/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'\r\n\tfrom /Users/suzuken/Documents/suzan2go/nasulog/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'\r\n\tfrom /usr/local/opt/rbenv/versions/2.2.4/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'\r\n\tfrom /usr/local/opt/rbenv/versions/2.2.4/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'\r\n\tfrom /usr/local/opt/rbenv/versions/2.2.4/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'\r\n\tfrom /usr/local/opt/rbenv/versions/2.2.4/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'\r\n\tfrom /usr/local/opt/rbenv/versions/2.2.4/lib/ruby/2.2.0/tsort.rb:345:in `each'\r\n\tfrom /usr/local/opt/rbenv/versions/2.2.4/lib/ruby/2.2.0/tsort.rb:345:in `call'\r\n\tfrom /usr/local/opt/rbenv/versions/2.2.4/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'\r\n\tfrom /usr/local/opt/rbenv/versions/2.2.4/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'\r\n\tfrom /usr/local/opt/rbenv/versions/2.2.4/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'\r\n\tfrom /Users/suzuken/Documents/suzan2go/nasulog/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'\r\n\tfrom /Users/suzuken/Documents/suzan2go/nasulog/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'\r\n\tfrom /Users/suzuken/Documents/suzan2go/nasulog/config/environment.rb:5:in `<top (required)>'\r\n\tfrom /Users/suzuken/Documents/suzan2go/nasulog/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:328:in `require'\r\n\tfrom /Users/suzuken/Documents/suzan2go/nasulog/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:328:in `require_environment!'\r\n\tfrom /Users/suzuken/Documents/suzan2go/nasulog/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:142:in `require_application_and_environment!'\r\n\tfrom /Users/suzuken/Documents/suzan2go/nasulog/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:67:in `console'\r\n\tfrom /Users/suzuken/Documents/suzan2go/nasulog/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'\r\n\tfrom /Users/suzuken/Documents/suzan2go/nasulog/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'\r\n\tfrom bin/rails:4:in `require'\r\n\tfrom bin/rails:4:in `<main>'\r\n```\r\n\r\nI think this is because sprockets 3.X, `app.assets` is assigned in after_initialize callback .\r\nhttps://github.com/rails/sprockets-rails/blob/master/lib/sprockets/railtie.rb#L164\r\n\r\nrelated #106 #111\r\n"},"comment":{"url":"https://api.github.com/repos/metaskills/less-rails/issues/comments/170286977","html_url":"https://github.com/metaskills/less-rails/pull/112#issuecomment-170286977","issue_url":"https://api.github.com/repos/metaskills/less-rails/issues/112","id":170286977,"user":{"login":"simi","id":193936,"avatar_url":"https://avatars.githubusercontent.com/u/193936?v=3","gravatar_id":"","url":"https://api.github.com/users/simi","html_url":"https://github.com/simi","followers_url":"https://api.github.com/users/simi/followers","following_url":"https://api.github.com/users/simi/following{/other_user}","gists_url":"https://api.github.com/users/simi/gists{/gist_id}","starred_url":"https://api.github.com/users/simi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simi/subscriptions","organizations_url":"https://api.github.com/users/simi/orgs","repos_url":"https://api.github.com/users/simi/repos","events_url":"https://api.github.com/users/simi/events{/privacy}","received_events_url":"https://api.github.com/users/simi/received_events","type":"User","site_admin":false},"created_at":"2016-01-09T22:12:22Z","updated_at":"2016-01-09T22:12:22Z","body":"released as 2.7.1"}}