我正在运行 rails 4、ruby 2.1.1、webbrick、heroku、Tweetstream。
我有一个 rake 文件,它可以流式传输推文并将它们保存到数据库中,它在开发中运行良好。
当我在 Heroku 中运行 rake 文件时,它只是在进入流循环时挂起......日志只是说“等待客户端”,然后挂起。
以前从未使用过调度程序或 rake。
我如何调试这个,找出问题,查看来自 twitter 的响应?我应该发布哪些附加信息?哪些设置可能导致此问题?
heroku 日志
014-07-17T05:08:26.334130+00:00 heroku[api]: Starting process with command `bundle exec rake tweet_stream` by user@email.com
2014-07-17T05:08:30.027406+00:00 heroku[run.5680]: State changed from starting to up
2014-07-17T05:08:29.884399+00:00 heroku[run.5680]: Starting process with command `bundle exec rake tweet_stream`
2014-07-17T05:08:29.842136+00:00 heroku[run.5680]: Awaiting client
宝石文件
source 'https://rubygems.org'
gem 'pry'
gem 'tweetstream'
gem 'rickshaw_rails'
gem 'twitter'
gem 'figaro'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.0'
# Use postgresql as the database for Active Record
gem 'pg'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring', group: :development
gem 'rails_12factor', group: :production
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
ruby "2.1.0"