json RESTテスト
- 2014年 9月1日(月) 09:47 JST
- 投稿者: akira
- 表示回数 116
コマンドラインcurl 編
2025年 4月4日(金) 13:42 JST
$ export CPPFLAGS=-I/opt/X11/include
$ export ARCHFLAGS="-arch x86_64"
ruby 1.8.7 p371のupgrade 時にこれを入れとかないとmakeに失敗する。
remote file editing、サーバ上のファイルを編集する場合
1. あらかじめサーバ上にrubyをインストールする。
2. /usr/local/bin にtextmate2の環境設定->Terminal内にあるrmateを実行権限付きで置く。
3. textmate2をMac上で予め起動する。
4. $ ssh -R 52698:localhost:52698 username@server でサーバにログイン。
5. 編集したいファイルをサーバ上で指定。
rmate index.html
6. sudo 指定も可能
事前に
export CC=/usr/bin/gcc-4.2 は必要なかったかも。
MacBook Pro 2008 Late 1.8.7-p370の make test 3つ失敗とエラー macportではtest-allは問題ない筈。
$ make test-all
./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb ./runruby.rb --extout=.ext -- "./test/runner.rb" --basedir="./test" --runner=console
Loaded suite .
Started
...................................................................................................................................................................................................................................................................................................................................................................F................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E............................
Finished in 475.250646 seconds.
1) Failure:
test_connection_refused_in_request(TestHTTP::HTTPConnectionTest) [./test/net/http/test_connection.rb:20]:
[ruby-core:28028].
<EOFError> exception expected but was
Class: <Errno::ECONNRESET>
Message: <"Connection reset by peer">
---Backtrace---
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/protocol.rb:135:in `sysread'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/protocol.rb:135:in `rbuf_fill'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/timeout.rb:67:in `timeout'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/timeout.rb:101:in `timeout'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/protocol.rb:134:in `rbuf_fill'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/protocol.rb:116:in `readuntil'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/protocol.rb:126:in `readline'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/http.rb:2028:in `read_status_line'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/http.rb:2017:in `read_new'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/http.rb:1051:in `request'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/http.rb:1037:in `request'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/http.rb:543:in `start'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/http.rb:1035:in `request'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/http.rb:948:in `request_get'
./test/net/http/test_connection.rb:22:in `test_connection_refused_in_request'
./test/net/http/test_connection.rb:20:in `test_connection_refused_in_request'
---------------
2) Failure:
test_readpartial_pos(TestIO)
[./test/ruby/test_io.rb:28:in `test_readpartial_pos'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/open-uri.rb:32:in `open_uri_original_open'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/open-uri.rb:32:in `open'
./test/ruby/test_io.rb:25:in `test_readpartial_pos'
./test/ruby/test_io.rb:9:in `mkcdtmpdir'
./test/ruby/test_io.rb:8:in `chdir'
./test/ruby/test_io.rb:8:in `mkcdtmpdir'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/tmpdir.rb:129:in `mktmpdir'
./test/ruby/test_io.rb:7:in `mkcdtmpdir'
./test/ruby/test_io.rb:23:in `test_readpartial_pos']:
<2> expected but was
<0>.
3) Error:
test_params(TestZlibDeflate):
Zlib::BufError: buffer error
./test/zlib/test_zlib.rb:130:in `inflate'
./test/zlib/test_zlib.rb:130:in `test_params'
2257 tests, 1672047 assertions, 2 failures, 1 errors
make: *** [test-all] Error 1
どうも、MacBook Pro 2012でも同じ見たい。
$ cd .rvm/src/ruby-1.8.7-p370/
condor:ruby-1.8.7-p370 kei$ make test-all
./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb ./runruby.rb --extout=.ext -- "./test/runner.rb" --basedir="./test" --runner=console
Loaded suite .
Started
...................................................................................................................................................................................................................................................................................................................................................................F................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................F...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E............................
Finished in 258.67458 seconds.
1) Failure:
test_connection_refused_in_request(TestHTTP::HTTPConnectionTest) [./test/net/http/test_connection.rb:20]:
[ruby-core:28028].
<EOFError> exception expected but was
Class: <Errno::ECONNRESET>
Message: <"Connection reset by peer">
---Backtrace---
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/protocol.rb:135:in `sysread'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/protocol.rb:135:in `rbuf_fill'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/timeout.rb:67:in `timeout'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/timeout.rb:101:in `timeout'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/protocol.rb:134:in `rbuf_fill'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/protocol.rb:116:in `readuntil'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/protocol.rb:126:in `readline'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/http.rb:2028:in `read_status_line'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/http.rb:2017:in `read_new'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/http.rb:1051:in `request'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/http.rb:1037:in `request'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/http.rb:543:in `start'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/http.rb:1035:in `request'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/net/http.rb:948:in `request_get'
./test/net/http/test_connection.rb:22:in `test_connection_refused_in_request'
./test/net/http/test_connection.rb:20:in `test_connection_refused_in_request'
---------------
2) Failure:
test_readpartial_pos(TestIO)
[./test/ruby/test_io.rb:28:in `test_readpartial_pos'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/open-uri.rb:32:in `open_uri_original_open'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/open-uri.rb:32:in `open'
./test/ruby/test_io.rb:25:in `test_readpartial_pos'
./test/ruby/test_io.rb:9:in `mkcdtmpdir'
./test/ruby/test_io.rb:8:in `chdir'
./test/ruby/test_io.rb:8:in `mkcdtmpdir'
/Users/kei/.rvm/src/ruby-1.8.7-p370/lib/tmpdir.rb:129:in `mktmpdir'
./test/ruby/test_io.rb:7:in `mkcdtmpdir'
./test/ruby/test_io.rb:23:in `test_readpartial_pos']:
<2> expected but was
<0>.
3) Error:
test_params(TestZlibDeflate):
Zlib::BufError: buffer error
./test/zlib/test_zlib.rb:130:in `inflate'
./test/zlib/test_zlib.rb:130:in `test_params'
2257 tests, 1672047 assertions, 2 failures, 1 errors
make: *** [test-all] Error 1
<?php phpinfo() ?>
忘れるのでメモ
d.hatena.ne.jp/handlename/20110812/1313104407
ここでインストールしたデバッガーを使用する時、そして、そのデバッガーが別のプロセスで動作するプログラムにアクセスする時
sudo コマンドが必要になる。
これを回避するには、
1. キーチェーン.appで証明書の作成を行い。 システムとして作成
2. 証明書の設定として、コード署名:常に信頼とし
3. $ codesign -s gdb-cert `which gdb`
とし、そのデバッガーを登録する。
$ sudo xcodebuild -license
macportsのpackagesインストール時にすること、xcodeで、command line toolsを入れる事以外に必要。
過去 7 内に最も多くの人の興味を引いたアイテム: 日
指定した期間内にLikesもDislikesもありません。