/Users/agusddt/developments/crm/config/initializers/sunspot_configuration.rb:52:in `block in <top (required)>': undefined method `gsub' for nil:NilClass (NoMethodError)
from /Users/agusddt/developments/crm/config/initializers/sunspot_configuration.rb:45:in `each'
from /Users/agusddt/developments/crm/config/initializers/sunspot_configuration.rb:45:in `<top (required)>'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `load'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `block in load'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:268:in `load'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/engine.rb:652:in `block in load_config_initializer'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.3/lib/active_support/notifications.rb:166:in `instrument'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/engine.rb:651:in `load_config_initializer'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/engine.rb:615:in `each'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/engine.rb:615:in `block in <class:Engine>'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/initializable.rb:30:in `run'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/agusddt/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
from /Users/agusddt/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
from /Users/agusddt/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
from /Users/agusddt/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
from /Users/agusddt/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/initializable.rb:44:in `each'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users/agusddt/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:411:in `call'
from /Users/agusddt/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
from /Users/agusddt/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
from /Users/agusddt/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `each'
from /Users/agusddt/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `call'
from /Users/agusddt/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
from /Users/agusddt/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
from /Users/agusddt/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/application.rb:352:in `initialize!'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/railtie.rb:194:in `public_send'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/railtie.rb:194:in `method_missing'
from /Users/agusddt/developments/crm/config/environment.rb:5:in `<top (required)>'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `block in require'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require'
from /Users/agusddt/developments/crm/config.ru:3:in `block in <main>'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
from /Users/agusddt/developments/crm/config.ru:in `new'
from /Users/agusddt/developments/crm/config.ru:in `<main>'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/commands/server.rb:61:in `app'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/commands/server.rb:139:in `log_to_stdout'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/commands/server.rb:78:in `start'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:80:in `block in server'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:75:in `server'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/agusddt/.rvm/gems/ruby-2.1.5/gems/railties-4.2.3/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Taking a look into the logs appears just a warning:
DEPRECATION WARNING: Currently, Active Record suppresses errors raised within `after_rollback`/`after_commit` callbacks and only print them to the logs. In the next version, these errors will no longer be suppressed. Instead, the errors will propagate normally just like in other Active Record callbacks.
You can opt into the new behavior and remove this warning by setting:
config.active_record.raise_in_transactional_callbacks = true
(called from <class:Asset> at /Users/agusddt/developments/crm/app/models/asset.rb:21)
But it seems the error is associated to asset.rb
Anyone can help me? I tried serveral things but I just do not know what else to do.
Thanks!
I was uploading my app to a server, put it in production mode on the server, still on development mode locally and suddenly I cannot run "rails server" anymores since it dies automatically with this error:/Users/agusddt/developments/crm/config/initializers/sunspot_configuration.rb:52:in `block in <top (required)>': undefined method `gsub' for nil:NilClass (NoMethodError)
from /Users/agusddt/developments/crm/config/initializers/sunspot_configuration.rb:45:in `each'
from /Users/agusddt/developments/crm/config/initializers/sunspot_configuration.rb:45:in `<top (required)>'
Taking a look into the logs appears just a warning:
DEPRECATION WARNING: Currently, Active Record suppresses errors raised within `after_rollback`/`after_commit` callbacks and only print them to the logs. In the next version, these errors will no longer be suppressed. Instead, the errors will propagate normally just like in other Active Record callbacks.
ActiveRecord::Base.class_eval doclass << selfalias_method :super_searchable, :searchabledef searchable(*args, &block)Search::Models.register selfSunspot::DSL::Fields.instance_variable_set '@current_model', selfsuper_searchable(*args, &block)enddef searchable_fields@searchable_fields ||= {}endendendSunspot::DSL::Fields.class_eval doalias_method :super_text, :textdef text(*args, &block)super_text(*args, &block)register_fields 'text', argsendalias_method :super_method_missing, :method_missingdef method_missing(name, *args, &block)super_method_missing(name, *args, &block)register_fields name, argsendprivatedef register_fields(search_type, fields)fields.each do |field|current_model.searchable_fields[field.to_sym] = Search::Field.new(current_model, field.to_sym, search_type.to_sym)endenddef current_modelSunspot::DSL::Fields.instance_variable_get '@current_model'endendrequire_relative 'sunspot_custom_types'require Rails.root + 'lib/util/generic_decorators.rb'# Eager load all the models so that the search data is readily availablerequire Rails.root + 'app/models/search.rb'Dir[Rails.root + 'app/models/**/*.rb'].each do |file|next if file.include?('/concerns/') || file.include?('/freshdesk_local/')if file.include? '/liquid/'require fileelse/app\/models\/(?<model_name>[\w\/]+\.rb)/ =~ fileKernel.const_get "#{model_name.gsub('.rb', '').camelize}"endend
I was uploading my app to a server, put it in production mode on the server, still on development mode locally and suddenly I cannot run "rails server" anymores since it dies automatically with this error:
/Users/agusddt/developments/crm/config/initializers/sunspot_configuration.rb:52:in `block in <top (required)>': undefined method `gsub' for nil:NilClass (NoMethodError)
--
You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/74sBRAiWkmE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAHUC_t-EXjv5D5b6d8HMMMFHoZ-MVOOv5wOTbEo%3Dma_saaMseQ%40mail.gmail.com.