gpt4 book ai didi

ruby-on-rails-3.1 - .rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:644:in `initialize': 没有这样的文件或目录 - getaddrinfo (Errno::ENOENT)

转载 作者:行者123 更新时间:2023-12-04 08:59:40 26 4
gpt4 key购买 nike

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

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

错误号::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'

最佳答案

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

当您使用 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)

关于ruby-on-rails-3.1 - .rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:644:in `initialize': 没有这样的文件或目录 - getaddrinfo (Errno::ENOENT),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16738884/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com