質問編集履歴

1

「require 'net/https'」に変更して実行

2021/11/23 03:51

投稿

decatail
decatail

スコア43

test CHANGED
File without changes
test CHANGED
@@ -152,6 +152,50 @@
152
152
 
153
153
 
154
154
 
155
+ <<追記>>
156
+
157
+ 最初の「require 'net/http'」を「require 'net/https'」に改めて実行すると以下のエラー
158
+
159
+ ```
160
+
161
+ USER@USERnoAir Keyphrase % ruby test1.rb
162
+
163
+ /Users/USER/.rbenv/versions/3.0.2/lib/ruby/3.0.0/net/protocol.rb:227:in `rbuf_fill': end of file reached (EOFError)
164
+
165
+ from /Users/USER/.rbenv/versions/3.0.2/lib/ruby/3.0.0/net/protocol.rb:193:in `readuntil'
166
+
167
+ from /Users/USER/.rbenv/versions/3.0.2/lib/ruby/3.0.0/net/protocol.rb:203:in `readline'
168
+
169
+ from /Users/USER/.rbenv/versions/3.0.2/lib/ruby/3.0.0/net/http/response.rb:42:in `read_status_line'
170
+
171
+ from /Users/USER/.rbenv/versions/3.0.2/lib/ruby/3.0.0/net/http/response.rb:31:in `read_new'
172
+
173
+ from /Users/USER/.rbenv/versions/3.0.2/lib/ruby/3.0.0/net/http.rb:1557:in `block in transport_request'
174
+
175
+ from /Users/USER/.rbenv/versions/3.0.2/lib/ruby/3.0.0/net/http.rb:1548:in `catch'
176
+
177
+ from /Users/USER/.rbenv/versions/3.0.2/lib/ruby/3.0.0/net/http.rb:1548:in `transport_request'
178
+
179
+ from /Users/USER/.rbenv/versions/3.0.2/lib/ruby/3.0.0/net/http.rb:1521:in `request'
180
+
181
+ from /Users/USER/.rbenv/versions/3.0.2/lib/ruby/3.0.0/net/http.rb:1514:in `block in request'
182
+
183
+ from /Users/USER/.rbenv/versions/3.0.2/lib/ruby/3.0.0/net/http.rb:960:in `start'
184
+
185
+ from /Users/USER/.rbenv/versions/3.0.2/lib/ruby/3.0.0/net/http.rb:1512:in `request'
186
+
187
+ from /Users/USER/.rbenv/versions/3.0.2/lib/ruby/3.0.0/net/http.rb:1535:in `send_entity'
188
+
189
+ from /Users/USER/.rbenv/versions/3.0.2/lib/ruby/3.0.0/net/http.rb:1323:in `post'
190
+
191
+ from test1.rb:29:in `post'
192
+
193
+ from test1.rb:35:in `<main>'
194
+
195
+ ```
196
+
197
+
198
+
155
199
  ```
156
200
 
157
201
  ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [arm64-darwin20]