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)>'

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!

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/e551fd25-a044-4324-b268-5c66396cf856%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to