
Ubuntu日本語フォーラム

ログインしていません。
flex sdk 3.5 を sun-java6-jdk 1.6.0 と共にインストールし、mxmlc を始めました。
しかしコンパイルに時間がかかるようで(私ばかりではないらしい)、rascut を導入したいと思いました。
http://d.hatena.ne.jp/nitoyon/20070914/ … all_rascut
上記ページに従い、rubygems を synaptic からインストールして
~: gem install rascut --include-dependencies
を試みたところ次のように返され、インストールできずの状態です。
如何すればよいでしょう ?
:~$ gem install rascut --include-dependencies
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
WARNING: Installing to ~/.gem since /var/lib/gems/1.9.1 and
/var/lib/gems/1.9.1/bin aren't both writable.
WARNING: You don't have /home/~/.gem/ruby/1.9.1/bin in your PATH,
gem executables will not run.
Building native extensions. This could take a while...
Building native extensions. This could take a while...
ERROR: Error installing rascut:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1:in `<main>'
Gem files will remain installed in /home/~/.gem/ruby/1.9.1/gems/mongrel-1.1.5 for inspection.
Results logged to /home/~/.gem/ruby/1.9.1/gems/mongrel-1.1.5/ext/http11/gem_make.out「both writable」は「権限の問題」かと思い、sudo でも同じでした。
オフライン
http://d.hatena.ne.jp/yambi/20100204/1265289135
上記から ruby-dev が漏れていたので、インストールすると、 aren't both writable. 行はありませんでしたが、それだけでした。
勿論 ruby 1.9.1 や libruby 1.9.1 などはインストール済です。
オフライン
apt-get install ruby-dev だと ruby1.8-dev ですけど ruby1.9.1-dev は入っていますか?
オフライン
chinajunk による投稿:
apt-get install ruby-dev だと ruby1.8-dev ですけど ruby1.9.1-dev は入っていますか?
そこまで気が回っていませんでした。ありがとうございます。
それで ruby1.9.1-dev をインストールしたのですが、今度は
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Building native extensions. This could take a while...
ERROR: Error installing rascut:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
checking for main() in -lc... yes
creating Makefile
make
cc -I. -I/usr/include/ruby-1.9.1/i486-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -fPIC -fno-strict-aliasing -g -g -O2 -O2 -g -Wall -Wno-parentheses -fPIC -o http11_parser.o -c http11_parser.c
cc -I. -I/usr/include/ruby-1.9.1/i486-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -fPIC -fno-strict-aliasing -g -g -O2 -O2 -g -Wall -Wno-parentheses -fPIC -o http11.o -c http11.c
http11.c: In function ‘http_field’:
http11.c:70: warning: format not a string literal and no format arguments
http11.c:71: warning: format not a string literal and no format arguments
http11.c:77: error: ‘struct RString’ has no member named ‘ptr’
http11.c:77: error: ‘struct RString’ has no member named ‘len’
http11.c:77: warning: left-hand operand of comma expression has no effect
http11.c: In function ‘request_uri’:
http11.c:102: warning: format not a string literal and no format arguments
http11.c: In function ‘fragment’:
http11.c:113: warning: format not a string literal and no format arguments
http11.c: In function ‘request_path’:
http11.c:124: warning: format not a string literal and no format arguments
http11.c: In function ‘query_string’:
http11.c:135: warning: format not a string literal and no format arguments
http11.c: In function ‘header_done’:
http11.c:172: error: ‘struct RString’ has no member named ‘ptr’
http11.c:172: error: ‘struct RString’ has no member named ‘ptr’
http11.c:172: error: ‘struct RString’ has no member named ‘ptr’
http11.c:174: error: ‘struct RString’ has no member named ‘ptr’
http11.c:176: error: ‘struct RString’ has no member named ‘ptr’
http11.c:177: error: ‘struct RString’ has no member named ‘len’
http11.c: In function ‘HttpParser_execute’:
http11.c:298: error: ‘struct RString’ has no member named ‘ptr’
http11.c:299: error: ‘struct RString’ has no member named ‘len’
http11.c:307: warning: format not a string literal and no format arguments
make: *** [http11.o] エラー 1
Gem files will remain installed in /var/lib/gems/1.9.1/gems/mongrel-1.1.5 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/mongrel-1.1.5/ext/http11/gem_make.outこのように [http11.o] 関係のエラーばかりが並んで、一向に mongrel の選択に進みません。
環境をき書き落としたので、今更ながらですが。
ubuntu kernel : 2.6.31-19-generic-pae (www.ubuntu.com)
m/b : ga-ma-780g-ud3h
cpu : phenom II x4 810 (2.6GB)
ram : elixir 2gb x 2
browser : firefox 3.5.8 / flock 2.5.6
オフライン
連投すみません。
上の方にあるこの 3 行は
Building native extensions. This could take a while...
ERROR: Error installing rascut:
ERROR: Failed to build gem native extension.http://rubygems.org/gems/rascut
での rake, mongrel, json_pure を意味するものなのでしょうか ?
オフライン
README.EXT.ja によると,1.8.6での
例えば,文字列strの長さを得るためには「RSTRING(str)->len」と
し,文字列strをchar*として得るためには「RSTRING(str)->ptr」
とします.配列の場合には,それぞれ「RARRAY(ary)->len」,
「RARRAY(ary)->ptr」となります.
が,1.9.1では
構造体からデータを取り出すマクロが提供されています.文字列
strの長さを得るためには「RSTRING_LEN(str)」とし,文字列strを
char*として得るためには「RSTRING_PTR(str)」とします.配列の
場合には,それぞれ「RARRAY_LEN(ary)」,「RARRAY_PTR(ary)」と
なります.
と,APIが変更されています.したがって,
http11.c:77: error: ‘struct RString’ has no member named ‘ptr’ http11.c:77: error: ‘struct RString’ has no member named ‘len’
から「rascut は ruby-1.9 に未対応」と読み取れます.
オフライン
einundzwanzighundertsechs による投稿:
「rascut は ruby-1.9 に未対応」と読み取れます.
ナルホド、そういう意味だったのですか。
「最新バージョン必ずしも」を初めて経験しました。
1.9 系をアンインストールして、1.8 系の不足分をインストールして、お蔭さまで
Successfully installed rake-0.8.7 Successfully installed gem_plugin-0.2.3 Successfully installed daemons-1.0.10 Successfully installed fastthread-1.0.7 Successfully installed cgi_multipart_eof_fix-2.5.0 Successfully installed mongrel-1.1.5 Successfully installed json_pure-1.2.1 Successfully installed rascut-0.2.1 8 gems installed Installing ri documentation for rake-0.8.7... Installing ri documentation for gem_plugin-0.2.3... Installing ri documentation for daemons-1.0.10... Installing ri documentation for fastthread-1.0.7...
という喜びを得ることができました。
ありがとうございました。
オフライン