我已将Twilio添加到我的rails应用程序中,当我将更改推送到heroku时,我收到以下错误。我在找回问题时遇到了麻烦。
Running: rake assets:precompile
rake aborted!
undefined method `strip' for nil:NilClass
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/twilio-ruby-3.11.5/lib/twilio-ruby/rest/client.rb:142:in `initialize'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/config/initializers/twilio.rb:6:in `new'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/config/initializers/twilio.rb:6:in `<top (required)>'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `block in load'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:609:in `block (2 levels) in <class:Engine>'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:608:in `each'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:608:in `block in <class:Engine>'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `each'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `tsort_each_child'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/config/environment.rb:5:in `<top (required)>'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:189:in `require_environment!'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:250:in `block in run_tasks_blocks'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:54:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
更新:在我的Twilio.rb(配置/初始化程序)中,我复制了Twilio网站上的一些代码。
require "twilio-ruby"
一旦我删除了这个,我就能把它推到heroku。