3

当我尝试运行时出现此错误:rake db:migrate、rake schema:load 和 rails s。我从 Bitbucket 克隆的应用程序无法使用,客户端无法提供帮助。

我已经重新安装了 ruby​​ 和 gemset,但它没有工作。我不知道如何解决这个错误。请帮忙。是什么导致了错误,我在哪里可以找到可能帮助我修复它的信息?

Errno::ENOENT

No such file or directory - getaddrinfo

Rails.root:/home/jacek/Programming/Rails/idea-academy 应用程序跟踪 | 框架跟踪 | 全跟踪

/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:644:in `initialize'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:644:in `open'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:644:in `block in connect'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/timeout.rb:58:in `timeout'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/timeout.rb:89:in `timeout'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:644:in `connect'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:637:in `do_start'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:626:in `start'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:1168:in `request'
newrelic_rpm (3.3.3) lib/new_relic/agent/instrumentation/net.rb:22:in `block in request_with_newrelic_trace'
newrelic_rpm (3.3.3) lib/new_relic/agent/method_tracer.rb:242:in `trace_execution_scoped'
newrelic_rpm (3.3.3) lib/new_relic/agent/instrumentation/net.rb:21:in `request_with_newrelic_trace'
copycopter_client (2.0.1) lib/copycopter_client/client.rb:49:in `block in download'
copycopter_client (2.0.1) lib/copycopter_client/client.rb:113:in `connect'
copycopter_client (2.0.1) lib/copycopter_client/client.rb:46:in `download'
copycopter_client (2.0.1) lib/copycopter_client/cache.rb:101:in `download'
copycopter_client (2.0.1) lib/copycopter_client/request_sync.rb:17:in `call'
newrelic_rpm (3.3.3) lib/new_relic/rack/browser_monitoring.rb:23:in `call'
newrelic_rpm (3.3.3) lib/new_relic/rack/developer_mode.rb:24:in `call'
sass (3.1.15) lib/sass/plugin/rack.rb:54:in `call'
warden (1.1.1) lib/warden/manager.rb:35:in `block in call'
warden (1.1.1) lib/warden/manager.rb:34:in `catch'
warden (1.1.1) lib/warden/manager.rb:34:in `call'
actionpack (3.1.1) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.3.3) lib/rack/etag.rb:23:in `call'
rack (1.3.3) lib/rack/conditionalget.rb:25:in `call'
actionpack (3.1.1) lib/action_dispatch/middleware/head.rb:14:in `call'
remotipart (1.0.2) lib/remotipart/middleware.rb:30:in `call'
actionpack (3.1.1) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.1.1) lib/action_dispatch/middleware/flash.rb:243:in `call'
rack (1.3.3) lib/rack/session/abstract/id.rb:195:in `context'
rack (1.3.3) lib/rack/session/abstract/id.rb:190:in `call'
actionpack (3.1.1) lib/action_dispatch/middleware/cookies.rb:331:in `call'
activerecord (3.1.1) lib/active_record/query_cache.rb:62:in `call'
activerecord (3.1.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:477:in `call'
actionpack (3.1.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (3.1.1) lib/active_support/callbacks.rb:392:in `_run_call_callbacks'
activesupport (3.1.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.1.1) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
rails-dev-tweaks (0.6.1) lib/rails_dev_tweaks/granular_autoload/middleware.rb:34:in `call'
rack (1.3.3) lib/rack/sendfile.rb:101:in `call'
actionpack (3.1.1) lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
actionpack (3.1.1) lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
railties (3.1.1) lib/rails/rack/logger.rb:13:in `call'
rack (1.3.3) lib/rack/methodoverride.rb:24:in `call'
rack (1.3.3) lib/rack/runtime.rb:17:in `call'
activesupport (3.1.1) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.3.3) lib/rack/lock.rb:15:in `call'
actionpack (3.1.1) lib/action_dispatch/middleware/static.rb:53:in `call'
railties (3.1.1) lib/rails/engine.rb:456:in `call'
railties (3.1.1) lib/rails/railtie/configurable.rb:30:in `method_missing'
rack (1.3.3) lib/rack/urlmap.rb:52:in `block in call'
rack (1.3.3) lib/rack/urlmap.rb:46:in `each'
rack (1.3.3) lib/rack/urlmap.rb:46:in `call'
railties (3.1.1) lib/rails/rack/content_length.rb:16:in `call'
railties (3.1.1) lib/rails/rack/log_tailer.rb:14:in `call'
rack (1.3.3) lib/rack/handler/webrick.rb:59:in `service'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/home/jacek/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
4

2 回答 2

2

这是一个非常古老的线程,但我想我已经找到了问题所在。

当您使用net/http并尝试实例化一个传递 URL 字符串的新对象http = Net::HTTP.new("http://127.0.0.1:4567")时,您将收到此错误。

您必须使用 URI 对象进行实例化,就像:

uri = URI.parse("http://localhost:4567")
http = Net::HTTP.new(uri.host, uri.port)
于 2013-07-22T22:31:34.247 回答
0

您是否安装了它需要的所有 gem?

你做了捆绑安装吗?

gem install bundler

bundle

于 2013-05-24T16:04:21.800 回答