0

我已经安装了 ruby​​ 193 应用程序,并且我已经安装了 Heroku toolbel 来加载我的应用程序,它会自动安装 ruby​​ 192。我也使用这两个版本。

C:\Prove>pik list
  187: ruby 1.8.7 (2012-02-08 patchlevel 358) [i386-mingw32]
* 192: ruby 1.9.2p290 (2011-07-09) [i386-mingw32]
  193: ruby 1.9.3p194 (2012-04-20) [i386-mingw32]

在指定我放入我的 gemfile的 ruby​​ 版本之后

ruby "1.9.3" 

然后,在开始使用 heroku之后,我创建了一个 git 存储库,并且在控制台中遇到了这些错误:

C:\Prove>heroku create surveymed
Creating surveymed... done, stack is cedar
http://surveymed.herokuapp.com/ | git@heroku.com:surveymed.git

C:\Prove>git push heroku master
Counting objects: 163, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (142/142), done.
Writing objects: 100% (163/163), 68.60 KiB, done.
Total 163 (delta 28), reused 0 (delta 0)

-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Using Ruby version: ruby-1.9.3
-----> Installing dependencies using Bundler version 1.2.2
       Running: bundle install --without development:test --path vendor/bundle --binstubs bin/
   Fetching gem metadata from https://rubygems.org/.

   Error Bundler::HTTPError during request to dependency API

   Fetching full source index from https://rubygems.org/
   Installing rake (10.0.2)
   Installing i18n (0.6.1)
   Installing multi_json (1.3.7)
   Installing activesupport (3.2.8)
   Installing builder (3.0.4)
   Installing activemodel (3.2.8)
   Installing erubis (2.7.0)
   Installing journey (1.0.4)
   Installing rack (1.4.1)
   Installing rack-cache (1.2)
   Installing rack-test (0.6.2)
   Installing hike (1.2.1)
   Installing tilt (1.3.3)
   Installing sprockets (2.1.3)
   Installing actionpack (3.2.8)
   Installing mime-types (1.19)
   Installing polyglot (0.3.3)
   Installing treetop (1.4.12)
   Installing mail (2.4.4)
   Installing actionmailer (3.2.8)
   Installing arel (3.0.2)
   Installing tzinfo (0.3.35)
   Installing activerecord (3.2.8)
   Installing activeresource (3.2.8)
   Using bundler (1.2.2)
   Installing coffee-script-source (1.4.0)
   Installing execjs (1.4.0)
   Installing coffee-script (2.2.0)
   Installing rack-ssl (1.3.2)
   Installing json (1.7.5) with native extensions
   Installing rdoc (3.12)
   Installing thor (0.16.0)
   Installing railties (3.2.8)
   Installing coffee-rails (3.2.2)
   Installing comma (3.0.4)
   Installing jquery-rails (2.1.4)
   Installing pg (0.14.1) with native extensions
   Installing rails (3.2.8)
   Installing sass (3.2.3)
   Installing sass-rails (3.2.5)
   Installing uglifier (1.3.0)
   Your bundle is complete! It was installed into ./vendor/bundle
   Post-install message from rdoc:
   Depending on your version of ruby, you may need to install ruby rdoc/ri data:
   <= 1.8.6 : unsupported
   = 1.8.7 : gem install rdoc-data; rdoc-data --install
   = 1.9.1 : gem install rdoc-data; rdoc-data --install
   >= 1.9.2 : nothing to do! Yay!

   Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
   Running: rake assets:precompile
   Asset precompilation completed (11.50s)
-----> Rails plugin injection
   Injecting rails_log_stdout
       Injecting rails3_serve_static_assets
-----> Discovering process types
   Procfile declares types      -> (none)
   Default types for Ruby/Rails -> console, rake, web, worker
-----> Compiled slug size: 19.4MB
-----> Launching... done, v6
   http://surveymed.herokuapp.com deployed to Heroku

To git@heroku.com:surveymed.git
 * [new branch]      master -> master

C:\Prove>heroku run rake db:migrate
Running rake db:migrate attached to terminal... C:/Program Files (x86)/Heroku/lib/heroku/client/rendezvous.rb:33:in `initialize': Impossibile stabilire la connessione. Risposta non corretta della parte connessa dopo l'intervallo di tempo oppure mancata risposta dall'host collegato. - connect(2) (Errno::ETIMEDOUT)
    from C:/Program Files (x86)/Heroku/lib/heroku/client/rendezvous.rb:33:in `open'
    from C:/Program Files (x86)/Heroku/lib/heroku/client/rendezvous.rb:33:in `block in start'
    from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/1.9.1/timeout.rb:58:in `timeout'
    from C:/Program Files (x86)/Heroku/lib/heroku/client/rendezvous.rb:27:in `start'
    from C:/Program Files (x86)/Heroku/lib/heroku/command/run.rb:35:in `index'
    from C:/Program Files (x86)/Heroku/lib/heroku/command.rb:148:in `run'
    from C:/Program Files (x86)/Heroku/lib/heroku/cli.rb:9:in `start'
    from C:/Program Files (x86)/Heroku/bin/heroku:28:in `<main>'

C:\Prove>bundle exec heroku run rake db:migrate
C:/Program Files (x86)/ruby-1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0) amongst [activemodel-3.0.5, activesupport-3.0.5, builder-2.1.2, i18n-0.6.0, mime-types-1.19, minitest-1.6.0,rack-1.4.1, rake-0.8.7, rdoc-2.5.8, rest-client-1.6.7, sequel-3.20.0, sinatra-1.0, taps-0.3.24] (Gem::LoadError)
    from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
    from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/site_ruby/1.9.1/rubygems.rb:1210:in `gem'
    from C:/Ruby193/bin/bundle:22:in `<main>'

C:\Prove>heroku config
DATABASE_URL              => postgres://wwubhcqjymyjxu:9UNe7N04FEaL-7_-34-9uYL5u
G@ec2-23-21-190-247.compute-1.amazonaws.com:5432/d651rjclu5sbro
GEM_PATH                  => vendor/bundle/ruby/1.9.1
HEROKU_POSTGRESQL_RED_URL => postgres://wwubhcqjymyjxu:9UNe7N04FEaL-7_-34-9uYL5u
G@ec2-23-21-190-247.compute-1.amazonaws.com:5432/d651rjclu5sbro
LANG                      => en_US.UTF-8
PATH                      => bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/us
r/bin:/bin
RACK_ENV                  => production
RAILS_ENV                 => production

C:\Prove>

错误是什么,我快疯了:(

我认为错误在这里:

C:\Prove>heroku run "ruby -v"
Running ruby -v attached to terminal...
The 'heroku' gem has been deprecated and replaced with the Heroku Toolbelt, download and install from https://toolbelt.heroku.com.

C:/Program Files (x86)/Heroku/lib/heroku/client/rendezvous.rb:33:in `initialize': Unable to establish connection. Connected party did not properly respond after a period of time or lack of response from the host connected. - connect(2) (Errno::ETIMEDOUT)
    from C:/Program Files (x86)/Heroku/lib/heroku/client/rendezvous.rb:33:in `open'
    from C:/Program Files (x86)/Heroku/lib/heroku/client/rendezvous.rb:33:in `block in start'
    from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/1.9.1/timeout.rb:58:in `timeout'
    from C:/Program Files (x86)/Heroku/lib/heroku/client/rendezvous.rb:27:in `start'
    from C:/Program Files (x86)/Heroku/lib/heroku/command/run.rb:35:in `index'
    from C:/Program Files (x86)/Heroku/lib/heroku/command.rb:148:in `run'
    from C:/Program Files (x86)/Heroku/lib/heroku/cli.rb:9:in `start'
    from C:/Program Files (x86)/Heroku/bin/heroku:28:in `<main>'
4

0 回答 0