Failure to upload file to S3 using Ruby - ruby

I'm uploading a collection of files to S3 (53 files) but towards the end, around 45 files, this starts to happen:
Connection reset by peer
E, [2015-05-07T10:43:03.361617 #8542] ERROR -- : /home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/openssl/buffering.rb:326:in `syswrite'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/openssl/buffering.rb:326:in `do_write'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/openssl/buffering.rb:344:in `write'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/protocol.rb:211:in `write0'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/protocol.rb:185:in `block in write'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/protocol.rb:202:in `writing'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/protocol.rb:184:in `write'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http/generic_request.rb:187:in `send_request_with_body'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http/generic_request.rb:120:in `exec'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/aws-sdk-v1-1.64.0/lib/aws/core/http/patch.rb:27:in `block in new_transport_request'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/aws-sdk-v1-1.64.0/lib/aws/core/http/patch.rb:26:in `catch'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/aws-sdk-v1-1.64.0/lib/aws/core/http/patch.rb:26:in `new_transport_request'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1383:in `request'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1376:in `block in request'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:853:in `start'
/home/mauricio/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1374:in `request'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.3/lib/httparty/request.rb:98:in `perform'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.3/lib/httparty.rb:539:in `perform_request'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.3/lib/httparty.rb:501:in `put'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/httparty-0.13.3/lib/httparty.rb:589:in `put'
/home/mauricio/.rvm/gems/ruby-2.2.0/bundler/gems/neat-cli-44b0902e2c95/lib/neat_cli/client.rb:318:in `block in finish_upload'
/home/mauricio/.rvm/gems/ruby-2.2.0/bundler/gems/neat-cli-44b0902e2c95/lib/neat_cli/client.rb:698:in `call'
/home/mauricio/.rvm/gems/ruby-2.2.0/bundler/gems/neat-cli-44b0902e2c95/lib/neat_cli/client.rb:698:in `validating_response'
/home/mauricio/.rvm/gems/ruby-2.2.0/bundler/gems/neat-cli-44b0902e2c95/lib/neat_cli/client.rb:317:in `finish_upload'
/home/mauricio/.rvm/gems/ruby-2.2.0/bundler/gems/neat-cli-44b0902e2c95/lib/neat_cli/client.rb:327:in `v4_upload'
/home/mauricio/projects/ruby/spi-test/lib/spitest/webapp.rb:17:in `block in upload'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/retriable-2.0.2/lib/retriable.rb:53:in `block in retriable'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/retriable-2.0.2/lib/retriable.rb:48:in `each'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/retriable-2.0.2/lib/retriable.rb:48:in `with_index'
/home/mauricio/.rvm/gems/ruby-2.2.0/gems/retriable-2.0.2/lib/retriable.rb:48:in `retriable'
/home/mauricio/projects/ruby/spi-test/lib/spitest/webapp.rb:15:in `upload'
/home/mauricio/projects/ruby/spi-test/lib/spitest/launcher.rb:44:in `block (3 levels) in upload_to_all_dests'
/home/mauricio/projects/ruby/spi-test/lib/spitest/thread_pool.rb:21:in `call'
/home/mauricio/projects/ruby/spi-test/lib/spitest/thread_pool.rb:21:in `block (2 levels) in start'
I have already changed the TCP buffers but this is still causing issues when uploading lots of files.
Any idea how to fix this?
I'm running Ubuntu 14.04 and Ruby 2.2.0p0.

Related

Errno::EMFILE: Too many open files when upgrading to ruby 2.3

I just upgrade to ruby 2.3 in order to take benefits of the frozen_string_literal option but it produce me the error Errno::EMFILE: Too many open files in production.
When I downgrade to ruby 2.2.3, no more errors.
Here is one of the ruby 2.3 error calltrace I have :
Errno::EMFILE: Too many open files - socket(2) for "XX.XXX.XX.XXX" port 9200 (XX.XXX.XX.XXX:9200)
/.../production/shared/bundle/ruby/2.3.0/gems/httpclient-2.7.1/lib/httpclient/session.rb:597:in `initialize'
/.../production/shared/bundle/ruby/2.3.0/gems/httpclient-2.7.1/lib/httpclient/session.rb:597:in `new'
/.../production/shared/bundle/ruby/2.3.0/gems/httpclient-2.7.1/lib/httpclient/session.rb:597:in `create_socket'
/.../production/shared/bundle/ruby/2.3.0/gems/httpclient-2.7.1/lib/httpclient/session.rb:742:in `block in connect'
/.../.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
/.../.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
/.../production/shared/bundle/ruby/2.3.0/gems/httpclient-2.7.1/lib/httpclient/session.rb:735:in `connect'
/.../production/shared/bundle/ruby/2.3.0/gems/httpclient-2.7.1/lib/httpclient/session.rb:497:in `query'
/.../production/shared/bundle/ruby/2.3.0/gems/httpclient-2.7.1/lib/httpclient/session.rb:170:in `query'
/.../production/shared/bundle/ruby/2.3.0/gems/httpclient-2.7.1/lib/httpclient.rb:1238:in `do_get_block'
/.../production/shared/bundle/ruby/2.3.0/gems/httpclient-2.7.1/lib/httpclient.rb:1021:in `block in do_request'
/.../production/shared/bundle/ruby/2.3.0/gems/httpclient-2.7.1/lib/httpclient.rb:1129:in `protect_keep_alive_disconnected'
/.../production/shared/bundle/ruby/2.3.0/gems/httpclient-2.7.1/lib/httpclient.rb:1016:in `do_request'
/.../production/shared/bundle/ruby/2.3.0/gems/httpclient-2.7.1/lib/httpclient.rb:858:in `request'
/.../production/shared/bundle/ruby/2.3.0/gems/faraday-0.9.2/lib/faraday/adapter/httpclient.rb:36:in `call'
/.../production/shared/bundle/ruby/2.3.0/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
/.../production/shared/bundle/ruby/2.3.0/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
/.../production/shared/bundle/ruby/2.3.0/bundler/gems/elasticsearch-ruby-a5ed3f6aa679/elasticsearch-transport/lib/elasticsearch/transport/transport/http/faraday.rb:21:in `block in perform_request'
/.../production/shared/bundle/ruby/2.3.0/bundler/gems/elasticsearch-ruby-a5ed3f6aa679/elasticsearch-transport/lib/elasticsearch/transport/transport/base.rb:201:in `perform_request'
/.../production/shared/bundle/ruby/2.3.0/bundler/gems/elasticsearch-ruby-a5ed3f6aa679/elasticsearch-transport/lib/elasticsearch/transport/transport/http/faraday.rb:20:in `perform_request'
/.../production/shared/bundle/ruby/2.3.0/bundler/gems/elasticsearch-ruby-a5ed3f6aa679/elasticsearch-transport/lib/elasticsearch/transport/client.rb:125:in `perform_request'
/.../production/shared/bundle/ruby/2.3.0/bundler/gems/elasticsearch-ruby-a5ed3f6aa679/elasticsearch-api/lib/elasticsearch/api/actions/index.rb:99:in `index'
/.../production/shared/bundle/ruby/2.3.0/bundler/gems/elasticsearch-rails-489ab24998a8/elasticsearch-model/lib/elasticsearch/model/indexing.rb:336:in `index_document'
/.../production/releases/20160128001123/app/models/concerns/elastic_search/searchable.rb:12:in `block (3 levels) in '
/.../production/releases/20160128001123/app/jobs/elasticsearch_job.rb:9:in `perform'
/.../production/shared/bundle/ruby/2.3.0/gems/activejob-4.2.5.1/lib/active_job/execution.rb:32:in `block in perform_now'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:117:in `call'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:441:in `instance_exec'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:441:in `block in make_lambda'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:342:in `block in simple'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `block in around'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple'
/.../production/shared/bundle/ruby/2.3.0/gems/i18n-0.7.0/lib/i18n.rb:257:in `with_locale'
/.../production/shared/bundle/ruby/2.3.0/gems/activejob-4.2.5.1/lib/active_job/translation.rb:7:in `block (2 levels) in '
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:441:in `instance_exec'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:441:in `block in make_lambda'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:342:in `block in simple'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `block in around'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple'
/.../production/shared/bundle/ruby/2.3.0/gems/activejob-4.2.5.1/lib/active_job/logging.rb:23:in `block (4 levels) in '
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/notifications.rb:164:in `block in instrument'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/notifications.rb:164:in `instrument'
/.../production/shared/bundle/ruby/2.3.0/gems/activejob-4.2.5.1/lib/active_job/logging.rb:22:in `block (3 levels) in '
/.../production/shared/bundle/ruby/2.3.0/gems/activejob-4.2.5.1/lib/active_job/logging.rb:43:in `block in tag_logger'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/tagged_logging.rb:68:in `block in tagged'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/tagged_logging.rb:26:in `tagged'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/tagged_logging.rb:68:in `tagged'
/.../production/shared/bundle/ruby/2.3.0/gems/activejob-4.2.5.1/lib/active_job/logging.rb:43:in `tag_logger'
/.../production/shared/bundle/ruby/2.3.0/gems/activejob-4.2.5.1/lib/active_job/logging.rb:19:in `block (2 levels) in '
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:441:in `instance_exec'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:441:in `block in make_lambda'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:342:in `block in simple'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:497:in `block in around'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:778:in `_run_perform_callbacks'
/.../production/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
/.../production/shared/bundle/ruby/2.3.0/gems/activejob-4.2.5.1/lib/active_job/execution.rb:31:in `perform_now'
/.../production/shared/bundle/ruby/2.3.0/gems/activejob-4.2.5.1/lib/active_job/execution.rb:21:in `execute'
/.../production/shared/bundle/ruby/2.3.0/gems/activejob-4.2.5.1/lib/active_job/queue_adapters/sidekiq_adapter.rb:42:in `perform'
/.../production/shared/bundle/ruby/2.3.0/gems/sidekiq-3.5.4/lib/sidekiq/processor.rb:80:in `execute_job'
/.../production/shared/bundle/ruby/2.3.0/gems/sidekiq-3.5.4/lib/sidekiq/processor.rb:56:in `block (2 levels) in process'
/.../production/shared/bundle/ruby/2.3.0/gems/sidekiq-3.5.4/lib/sidekiq/middleware/chain.rb:127:in `block in invoke'
/.../production/shared/bundle/ruby/2.3.0/gems/sidekiq-3.5.4/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
/.../production/shared/bundle/ruby/2.3.0/gems/sidekiq-3.5.4/lib/sidekiq/middleware/server/active_record.rb:6:in `call'
/.../production/shared/bundle/ruby/2.3.0/gems/sidekiq-3.5.4/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
/.../production/shared/bundle/ruby/2.3.0/gems/sidekiq-3.5.4/lib/sidekiq/middleware/server/retry_jobs.rb:74:in `call'
/.../production/shared/bundle/ruby/2.3.0/gems/sidekiq-3.5.4/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
/.../production/shared/bundle/ruby/2.3.0/gems/sidekiq-failures-0.4.5/lib/sidekiq/failures/middleware.rb:9:in `call'
/.../production/shared/bundle/ruby/2.3.0/gems/sidekiq-3.5.4/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
/.../production/shared/bundle/ruby/2.3.0/gems/sidekiq-3.5.4/lib/sidekiq/middleware/server/logging.rb:11:in `block in call'
/.../production/shared/bundle/ruby/2.3.0/gems/sidekiq-3.5.4/lib/sidekiq/logging.rb:30:in `with_context'
/.../production/shared/bundle/ruby/2.3.0/gems/sidekiq-3.5.4/lib/sidekiq/middleware/server/logging.rb:7:in `call'
/.../production/shared/bundle/ruby/2.3.0/gems/sidekiq-3.5.4/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
/.../production/shared/bundle/ruby/2.3.0/gems/sidekiq-3.5.4/lib/sidekiq/middleware/chain.rb:132:in `invoke'
/.../production/shared/bundle/ruby/2.3.0/gems/sidekiq-3.5.4/lib/sidekiq/processor.rb:51:in `block in process'
/.../production/shared/bundle/ruby/2.3.0/gems/sidekiq-3.5.4/lib/sidekiq/processor.rb:104:in `stats'
/.../production/shared/bundle/ruby/2.3.0/gems/sidekiq-3.5.4/lib/sidekiq/processor.rb:50:in `process'
/.../production/shared/bundle/ruby/2.3.0/gems/celluloid-0.17.3/lib/celluloid/calls.rb:28:in `public_send'
/.../production/shared/bundle/ruby/2.3.0/gems/celluloid-0.17.3/lib/celluloid/calls.rb:28:in `dispatch'
/.../production/shared/bundle/ruby/2.3.0/gems/celluloid-0.17.3/lib/celluloid/call/async.rb:7:in `dispatch'
/.../production/shared/bundle/ruby/2.3.0/gems/celluloid-0.17.3/lib/celluloid/cell.rb:50:in `block in dispatch'
/.../production/shared/bundle/ruby/2.3.0/gems/celluloid-0.17.3/lib/celluloid/cell.rb:76:in `block in task'
/.../production/shared/bundle/ruby/2.3.0/gems/celluloid-0.17.3/lib/celluloid/actor.rb:339:in `block in task'
/.../production/shared/bundle/ruby/2.3.0/gems/celluloid-0.17.3/lib/celluloid/task.rb:44:in `block in initialize'
/.../production/shared/bundle/ruby/2.3.0/gems/celluloid-0.17.3/lib/celluloid/task/fibered.rb:14:in `block in create'
I did not find someone with this concern on the ruby bug tracker nor on stackoverflow and the ruby 2.3 is recent (<2 months).
How can I deal with this?

RHC setup gives mkdir error

I am trying to add an openshift origin server for the first time. using :
rhc setup --server my.server.adr
but I get this error when it comes to Generate the token.
Generating an authorization token for this client ... C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:252:in `mkdir': No such file or directory #dir_s_mkdr - U: (Errno::ENOENT)
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:252:in `fu_mkdir'
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:226:in `block (2 levels) in mkdir_p'
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:224:in `reverse_each'
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:224:in `block in mkdir_p'
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:210:in `each'
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:210:in `mkdir_p'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/auth/token_store.rb:34:in `[]='
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/auth/token_store.rb:14:in `put'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/auth/token.rb:50:in `save'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/wizard.rb:243:in `block in login_stage'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/highline_extensions.rb:190:in `call'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/highline_extensions.rb:190:in `section'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/highline_extensions.rb:204:in `paragraph'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/helpers.rb:337:in `block (2 levels) in <module:Helpers>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/wizard.rb:237:in `login_stage'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/wizard.rb:67:in `block in run'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/wizard.rb:65:in `each'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/wizard.rb:65:in `run'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/commands/setup.rb:57:in `run'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/commands.rb:294:in `execute'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/commands.rb:285:in `block (3 levels) in to_commander'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/command.rb:180:in `call'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/command.rb:180:in `call'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/command.rb:155:in `run'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/runner.rb:421:in `run_active_command'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/command_runner.rb:72:in `run!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/commander-4.2.1/lib/commander/delegates.rb:8:in `run!'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/lib/rhc/cli.rb:37:in `start'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rhc-1.35.3/bin/rhc:20:in `<top (required)>'
from C:/Ruby22-x64/bin/rhc:23:in `load'
from C:/Ruby22-x64/bin/rhc:23:in `<main>'
I can't find what's wrong, and what is the - U: after #dir_s_mkdir ?
any help or hint would be apreciated.
Thank you for your answers, I think it's a compatibility problem as you said with ruby 2.2
I didn't use another ruby version but I used a docker container instead.

Issue in using Twitter API from Ruby

I am new bee to twitter API and MongoDb. I am trying out a ruby example from the book 'MongoDb In Action', Chapter-3 which connects to Twitter and gets feeds based on given tags. I have done the ruby set up as suggested. I am getting the following exception, which I think is related to ruby set up. Any hint is highly appreciated.
/usr/lib/ruby/1.9.1/net/http.rb:762:in `initialize': execution expired (Twitter::Error::ClientError)
from /usr/lib/ruby/1.9.1/net/http.rb:762:in `open'
from /usr/lib/ruby/1.9.1/net/http.rb:762:in `block in connect'
from /usr/lib/ruby/1.9.1/net/http.rb:762:in `connect'
from /usr/lib/ruby/1.9.1/net/http.rb:755:in `do_start'
from /usr/lib/ruby/1.9.1/net/http.rb:744:in `start'
from /usr/lib/ruby/1.9.1/net/http.rb:1284:in `request'
from /var/lib/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:75:in `perform_request'
from /var/lib/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:38:in `call'
from /var/lib/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/response.rb:8:in `call'
from /var/lib/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/response.rb:8:in `call'
from /var/lib/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/response.rb:8:in `call'
from /var/lib/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/request/url_encoded.rb:14:in `call'
from /var/lib/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/request/multipart.rb:13:in `call'
from /var/lib/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/request/multipart_with_file.rb:14:in `call'
from /var/lib/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/connection.rb:247:in `run_request'
from /var/lib/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/connection.rb:112:in `post'
from /var/lib/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/client.rb:108:in `request'
from /var/lib/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/client.rb:72:in `post'
from /var/lib/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/api/utils.rb:82:in `object_from_response'
from /var/lib/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/api/oauth.rb:24:in `token'
from /var/lib/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/client.rb:96:in `block in request_setup'
from /var/lib/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/connection.rb:102:in `block in get'
from /var/lib/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/connection.rb:243:in `block in run_request'
from /var/lib/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/connection.rb:258:in `block in build_request'
from /var/lib/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/request.rb:35:in `block in create'
from /var/lib/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/request.rb:34:in `tap'
from /var/lib/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/request.rb:34:in `create'
from /var/lib/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/connection.rb:254:in `build_request'
from /var/lib/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/connection.rb:239:in `run_request'
from /var/lib/gems/1.9.1/gems/faraday-0.8.7/lib/faraday/connection.rb:100:in `get'
from /var/lib/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/client.rb:108:in `request'
from /var/lib/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/client.rb:66:in `get'
from /var/lib/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/api/utils.rb:82:in `object_from_response'
from /var/lib/gems/1.9.1/gems/twitter-4.8.1/lib/twitter/api/search.rb:32:in `search'
from /var/lib/gems/1.9.1/gems/twitter-4.8.1/lib/twitter.rb:60:in `method_missing'
from /home/hadoop/archiver.rb:27:in `save_tweets_for'
from /home/hadoop/archiver.rb:21:in `update'
from update.rb:5:in `block in <main>'
from update.rb:3:in `each'
from update.rb:3:in `<main>'
The book you are reading was printed in 2011 and appears to use APIv1 which has recently been depreciated by twitter.
https://dev.twitter.com/docs/faq#17750
You'll need to set up oauth and I suggest you start with the twitter gem documentation.
https://github.com/sferik/twitter

Heroku precompile assets failed on Rail 4 app

I set
config.assets.initialize_on_precompile = false
in the application.rb. Assets were precompiled successfully locally by run
RAILS_ENV=production bundle exec rake assets:precompile
While the manifest-fingerprint.json(Rails 4.0 generates manifest.json instead of manifest.yml) was not detected when pushed to Heroku and Heroku tried to run precompile again. Then I got the error as:
Running: rake assets:precompile
rake aborted!
could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_adapters/postgresql_adapter.rb:771:in `initialize'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_adapters/postgresql_adapter.rb:771:in `new'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_adapters/postgresql_adapter.rb:771:in `connect'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_adapters/postgresql_adapter.rb:493:in `initialize'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `new'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `postgresql_connection'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_adapters/abstract/connection_pool.rb:446:in `new_connection'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_adapters/abstract/connection_pool.rb:456:in `checkout_new_connection'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_adapters/abstract/connection_pool.rb:427:in `acquire_connection'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_adapters/abstract/connection_pool.rb:364:in `block in checkout'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_adapters/abstract/connection_pool.rb:363:in `checkout'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_adapters/abstract/connection_pool.rb:273:in `block in connection'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_adapters/abstract/connection_pool.rb:272:in `connection'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_adapters/abstract/connection_pool.rb:552:in `retrieve_connection'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_handling.rb:79:in `retrieve_connection'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_handling.rb:53:in `connection'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/model_schema.rb:208:in `columns'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/model_schema.rb:242:in `column_defaults'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/locking/optimistic.rb:169:in `column_defaults'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/core.rb:164:in `initialize'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/inheritance.rb:24:in `new'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.beta1/lib/active_record/inheritance.rb:24:in `new'
/tmp/build_2ospgf61r6sch/lib/student_module.rb:11:in `acts_as_student'
/tmp/build_2ospgf61r6sch/app/models/applicant.rb:4:in `<class:Applicant>'
/tmp/build_2ospgf61r6sch/app/models/applicant.rb:3:in `<top (required)>'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:228:in `require'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:228:in `block in require'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:213:in `load_dependency'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:228:in `require'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:329:in `require_or_load'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:288:in `depend_on'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:206:in `require_dependency'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.beta1/lib/rails/engine.rb:464:in `block (2 levels) in eager_load!'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.beta1/lib/rails/engine.rb:463:in `each'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.beta1/lib/rails/engine.rb:463:in `block in eager_load!'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.beta1/lib/rails/engine.rb:461:in `each'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.beta1/lib/rails/engine.rb:461:in `eager_load!'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.beta1/lib/rails/engine.rb:346:in `eager_load!'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.beta1/lib/rails/application/finisher.rb:56:in `each'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.beta1/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.beta1/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.beta1/lib/rails/initializable.rb:30:in `run'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.beta1/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.beta1/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.beta1/lib/rails/application.rb:213:in `initialize!'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.beta1/lib/rails/railtie/configurable.rb:30:in `method_missing'
/tmp/build_2ospgf61r6sch/config/environment.rb:5:in `<top (required)>'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:228:in `require'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:228:in `block in require'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:213:in `load_dependency'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.beta1/lib/active_support/dependencies.rb:228:in `require'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.beta1/lib/rails/application.rb:187:in `require_environment!'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.beta1/lib/rails/application.rb:247:in `block in run_tasks_blocks'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.0.rc4/lib/sprockets/rails/task.rb:16:in `block (2 levels) in define'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:205:in `block in invoke_prerequisites'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:203:in `each'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:203:in `invoke_prerequisites'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:183:in `block in invoke_with_call_chain'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/tmp/build_2ospgf61r6sch/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
Seems the error was due to the file in the lib/student_module.rb, which was required in config/initializers/student_init.rb:
#lib/student_module.rb, the error pointed to this lineļ¼š
user_attributes = User.new.abttributes.keys
#config/initializers/student_init.rb
require 'student_module'
ActiveRecord::Base.extend Student
The error could be because Heroku initializes the app, which includes connection to the database. But I was not supposed to see the messages like
rake aborted!
could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
because I set config.assets.initialize_on_precompile false and also precompile the assets locally.
Any suggestions to solve this?Thanks!
You'll need to enable a labs feature on Heroku user-env-compile which gives the app access to the environment variables at compile time.
heroku labs:enable user-env-compile -a myapp
Read more about it at https://devcenter.heroku.com/articles/labs-user-env-compile

Can't connect to redis after upgrading ruby

I'm trying to upgrade my app to Mongoid 3 and ruby 1.9.3. I was on 1.9.2 before. My app also uses Redis as a temp data store. No code changes have occurred and this was working fine before... now I'm getting the following error when I run the task that connects to Redis:
Can't assign requested address - connect(2)
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/redis-3.0.1/lib/redis/connection/ruby.rb:113:in `connect_nonblock'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/redis-3.0.1/lib/redis/connection/ruby.rb:113:in `connect'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/redis-3.0.1/lib/redis/connection/ruby.rb:170:in `connect'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/redis-3.0.1/lib/redis/client.rb:257:in `establish_connection'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/redis-3.0.1/lib/redis/client.rb:63:in `connect'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/redis-3.0.1/lib/redis/client.rb:276:in `ensure_connected'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/redis-3.0.1/lib/redis/client.rb:167:in `block in process'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/redis-3.0.1/lib/redis/client.rb:242:in `logging'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/redis-3.0.1/lib/redis/client.rb:166:in `process'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/redis-3.0.1/lib/redis/client.rb:78:in `call'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/redis-3.0.1/lib/redis.rb:912:in `block in rpop'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/redis-3.0.1/lib/redis.rb:36:in `block in synchronize'
/Users/kevin/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/redis-3.0.1/lib/redis.rb:36:in `synchronize'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/redis-3.0.1/lib/redis.rb:911:in `rpop'
/Users/kevin/myapp/app/models/tweet.rb:34:in `block (3 levels) in load_from'
/Users/kevin/myapp/app/models/tweet.rb:33:in `times'
/Users/kevin/myapp/app/models/tweet.rb:33:in `block (2 levels) in load_from'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/eventmachine-1.0.0.rc.4/lib/eventmachine.rb:959:in `call'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/eventmachine-1.0.0.rc.4/lib/eventmachine.rb:959:in `block in run_deferred_callbacks'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/eventmachine-1.0.0.rc.4/lib/eventmachine.rb:956:in `times'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/eventmachine-1.0.0.rc.4/lib/eventmachine.rb:956:in `run_deferred_callbacks'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/eventmachine-1.0.0.rc.4/lib/eventmachine.rb:187:in `run_machine'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/eventmachine-1.0.0.rc.4/lib/eventmachine.rb:187:in `run'
/Users/kevin/myapp/app/models/tweet.rb:30:in `load_from'
/Users/kevin/myapp/lib/tasks/tweet.rake:11:in `block (2 levels) in <top (required)>'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/kevin/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/kevin/myapp/.bundle/ruby/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/kevin/myapp/.bundle/ruby/1.9.1/bin/rake:23:in `load'
/Users/kevin/myapp/.bundle/ruby/1.9.1/bin/rake:23:in `<main>'
Tasks: TOP => tweet:load
My Redis is running and I checked the port #.
Are you using Redis 3.0.1? Try using Redis 2.2.2

Resources