OraRails

Oracle(9i,10g)+RubyOnRails(Ver1.2.1+Apache+mongrel)の設定メモ

Apache2.2.4 + mongrel_cluster

2007-01-31 11:03:21 | Xserver+apache
参考サイト1)Install/Mongrel cluster With Apache2.2
参考サイト2)apxsでapacheにモジュールを追加する
参考サイト3)bind- おいぬまの覚書
参考サイト4)mongrel apache
参考サイト5)shachi-wiki
参考サイト6)Scaling Rails with Apache 2.2, mod_proxy_balancer and Mongrel

1)apacheの設定
ロードバランス設定のために、mongrelのサイトで紹介されていたconfigureオプションを指定します。
#./configure --enable-so --enable-deflate --enable-proxy --enable-proxy-balancer --enable-rewrite --enable-cache --enable-mem-cache --enable-ssl --enable-headers --with-included-apr

2)ProxyPass
参考)- 株式会社エスロジカル - 技術ドキュメント Apache:ProxyPass ディレクティブ

3)Proxy balancer
参考)YappoLogs: Apache 2.2.0 のロードバランス機能(mod_proxy_balancer)を使いこなす



bind9の設定

2007-01-31 10:40:54 | Xserver+apache
Virtualhostを組むために bind9の設定を触りました。

※bind9のサーバーはdebianです。

1) vi /etc/bind/local/aaaaa.zone 正引きの設定

2)赤字部分を追加

@ IN 86400 SOA aaaaa. bbbbb. (
2007011001 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)
@ IN A sss.sss.sss.sss
@ IN NS ccccc.

dns IN MX 10 ddddd.
@ IN MX 10 ddddd..

dns IN A mmm.mmm.mmm.mmm
www IN A qqq.qqq.qqq.qqq
hostname1 IN A 192.168.240.ddd
hostname2 IN A 192.168.240.ccc
hostname3 IN A 192.168.101.aaa
hostname4 IN A 192.168.101.bbb

type1 IN A 192.168.ttt.rrr
type2 IN A 192.168.ttt.rrr
type3 IN A 192.168.ttt.rrr
type4 IN A 192.168.ttt.rrr
type5 IN A 192.168.ttt.rrr
type6 IN A 192.168.ttt.rrr



3) vi /etc/bind/local/bbbb.zone 逆引きの設定

4)赤字部分の追加
@ IN 86400 SOA aaaaa. bbbbb. (
2007013001 ; serial
2880 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttk
)
@ IN NS dns.mmm.mmm.mmm.

ff0 IN PTR aaa.aaa.aaa.aa.

fff IN PTR type1.example.jp.
fff IN PTR type2.example.jp.
fff IN PTR type3.example.jp.
fff IN PTR type4.example.jp.
fff IN PTR type5.example.jp.
fff IN PTR type6.example.jp.

ffa IN PTR current1.example.jp.
ffb IN PTR current2.example.jp.
ffc IN PTR current3.example.jp.
ffd IN PTR current4.example.jp.
ffe IN PTR current5.example.jp.
ffg IN PTR current6.example.jp.
ffh IN PTR current7.example.jp

192.168.ttt.rrrのサーバーに6本の別ドメインサーバーの設定をしました。
( type1,type2,type3,type4,type5,type6 .example.jp )

Mongrel

2007-01-27 15:23:57 | Xserver+apache
mongrel 1.0.1,mongrel_clusterを入れる

参考サイト1)Mongrel
参考サイト2)Mongrelを使って見る

1.gem install mongrel

→ mongrel 1.0.1
2.railsアプリのフォルダへ移動して
 # 起動
mongrel_rails start -d development -p 3000 -B
 # 停止
mongrel_rails stop
3.gem install mongrel_cluster

→mongrel_cluster-0.2.1
4.コンフィギュレーション
  railsアプリのフォルダへ移動して

 #ポート8000~8002番でクラスタを組む
mongrel_rails cluster::configure -e production -p 8000 -N 3
 # 起動
  mongrel_rails cluster::start

 # 停止
  mongrel_rails cluster::stop



Ruby Rails ODBC 設定

2007-01-26 16:27:56 | Xserver+apache
RailsにODBCでOracle接続する。ドキュメントが少ない。。。。
参考サイト1)Ruby DBIモジュールを使う
参考サイト2)HowtoConnectToMicrosoftSQLServerFromRailsOnLinux→これを見ながらやりました
参考サイト3)OpenLink ODBC Adapter for ActiveRecord/RubyonRails

必要なもの
1.Actual ODBC driver (不要か?)
2.ruby-odbc ruby-odbc-0.9994
3.ruby-dbi dbi-0.1.1.tar → ruby-dbi
4.odbc-railsodbc-rails-1.3

手順 参考サイト2より
1.Ruby ODBC:

Before building ruby-odbc, make sure that you have odbc-devel installed as this is a requirement to build ruby-odbc. I used yum to install odbc-devel.

Also, note that if you are running Ubuntu “Breezey Badger,” you probably don’t have make installed, and won’t be able to run the code below. Install make by running Synaptic and searching for “make.” [David R]

# tar zvxf ruby-odbc-0.9994.tar.gz
# cd /usr/src/ruby-odbc-0.9994/
# ruby extconf.rb
# make
# make install

2.Ruby DBI ODBC driver:

# cd /usr/src/ruby-dbi
# ruby setup.rb config --with=dbi,dbd_odbc
# ruby setup.rb setup
# ruby setup.rb install

Test everything:
Heres a quick way to see if ruby can talk to SQL Server provided by Mark Imbriaco:

macsv1:/usr/src root# irb
irb(main):001:0> require "dbi"
=> true
irb(main):002:0> dbh = DBI . connect('dbi:ODBC:oota','macs','system')
=> #<DBI::DatabaseHandle:0x517e44 @trace_output=#>
irb(main):003:0> quit

→この時点でうまくいっていなければ、DBIで失敗してます
If everything went well, go make it work in Rails:

3.Setup Rails
odbc-railsのREADME →★設定IP他★を読む。
3パターンの入れ方がある。manualインストールをやりました。

find /usr/ -name 'odbc_adapter*' で、
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record の周辺にファイルができていることを確認

database.yml:

development:
adapter: odbc
dsn: oota
username: macs
password: system

Add other sections in the same manner.


PHP ODBC設定

2007-01-26 10:11:12 | Xserver+apache
結局 InstantClientがPPCのため、OCI接続はあきらめ、ODBC設定に切り替えました。ActualTecnologies
The Actual ODBC Driver for Oracle を購入 ライセンスキー →★設定IP他★
参考サイト1)Oracleドライバの設定
参考サイト2)PHPセットアップ

1.ODBCドライバの設定 →★設定IP他★
2.PHP5.2.0コンパイル
./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-ldap=/usr --with-kerberos=/usr --enable-cli --with-zlib-dir=/usr --enable-trans-sid --with-xml --enable-exif --enable-mbstring --enable-mbregex --enable-dbx --enable-sockets --with-iodbc=/usr --with-curl=/usr --with-mysql=/usr --with-mysql-sock=/var/mysql/mysql.sock

make
make install
完了

3.確認
サンプルソース でサンプルを作成して実行

Xcodeでコンパイル

2007-01-24 16:01:26 | Xserver+apache
MacOS 10.4.8 では Xcode2.4 を使うことができます。
Unixのソースをユニバーサルライブラリーにコンパイルするのに使えます。
やったことをメモしておきます。
参考サイト1)Xcode2.3ユーザーガイド:ファイル毎のコンパイルフラグ 
参考サイト2)Developing Cross-Platform Unix Applications with Mac OS X
参考サイト3)MacWiki

Rubyの場合の例)
If you'd like to reproduce this figure, you can use the following recipe.

1.Download the Ruby distribution from the Ruby download page.
2.If needed, unpack the distribution. If you download it with Safari, it should have been downloaded and unpacked onto your Desktop.
3.Open a Terminal window and cd to the Ruby distribution directory. Then run the configure script.
4.Open Xcode and create a new project of
the GNU Make type.>Save it to your Ruby distribution directory.
→ プロジェクトの中にGNU Make(This project builds using an external build system)というのものがある5.Add the Ruby sources to the project using Project > Add to Project menu.
6.Build using the Build > Build menu or Command-B.


自己流の手順でいくと
1.xxxx.tarの解凍
2.解凍先フォルダへ移動して ./configure オプションもプラスする
3.Xcodeで新規プロジェクトを作成(DynamicLibraryの中の External Build System)。解凍先フォルダに保存
例)php5.2.0フォルダに直接プロジェクトを作成する
4.プロジェクトを選んで、情報ボタンを押す。
ビルド→アーキテクチャ→i386,ppc にする。
一般→ターゲットSDKをしようしたクロス開発→MacOSX10.4u.sdk
5.ビルド する。

Ruby - OCI - Rails インストール(要約)

2007-01-06 18:50:52 | Xserver+apache
Rubyインストール関連をまとめました。

1.このIntelMacには、Universalbinary でRubyをインストールする。
macsv1:/usr/local/bin root# file ruby
ruby: Mach-O universal binary with 2 architectures
ruby (for architecture ppc): Mach-O executable ppc
ruby (for architecture i386): Mach-O executable i386

Makefile にCFLAGS="-arch ppc -archi386"を追加する

2.rubyGem、Railsは Universalbinary の状態でインストールする
3.oracleinstantClientが、ppcバイナリ対応なので、ruby/ociは、rbconfig.rb
を修正してppcに見せかけてコンパイルする

vi /usr/lib/ruby/1.8/i686-darwin8.8.4/rbconfig.rb

CONFIG["CFLAGS"] = "-arch ppc -g -O2 -pipe -fno-common"
CONFIG["DLDFLAGS"] = "-arch ppc"

macsv1:/usr/src/ruby-oci8-0.1.16 root# ruby setup.rb config -- --with-instant-client=/usr/local/oracle/instantclient10_1

OK

4.dittoコマンドで、ppc バイナリのrubyを作る
参考サイト1)Tissot Blogs →超重要
参考サイト2)Universal Binary Programming Guidelines, Second Edition: アプリケーションの強制翻訳実行 →超重要
macsv1:/usr/local/bin root# ditto -arch ppc /usr/bin/ruby ruby_pcc

macsv1:/usr/local/bin root# ruby_pcc -r oci8 -e "OCI8.new('macs', 'system', '//192.168.240.110:1521/orcl').exec('select count(*) from im01rc') do |r| puts r.join(','); end"
177729.0

これでOCIも動くようになった。Railsで動かすにはどうすれば良いか??


Ruby - OCI - Rails インストール(成功)

2007-01-05 11:03:22 | Xserver+apache
1.intel macに rubyをppcでコンパイルする
参考サイト1)MacWiki
参考サイト2)Mac OS X隆bind自力インストール→この人すごい
参考サイト3)Mac OSXのRubyを1.8.4にアップデートしつつRailsも...

3)を見ながら
1.readline のインストール
 readline-5.2.tar.gz
readlineとは..CUIのアプリケーションにおいて快適な行編集や履歴機能を提供するライブラリ.
インストール済であれば不要

2.Rubyインストールruby-1.8.5.tar.gz


cd /usr/src/ruby-1.8.5/
./configure --with-readline-dir=/usr/local
 Makefileを編集
CFLAGS =
-arch ppc -arch i386-g -02 -pipe -fno-common DRUBY_EXPORT
Universalbinary にする。青字を追加
make
make install

既にインストール済みのバージョンと緩衝しないために、ファイル名を変更する

参考サイト4)Mac OSXのRubyを1.8.4にアップデートしつつ、Railsも1.1.4に
ソースからコンパイルをすると、デフォルトでは /usr/local/bin にインストールされるらしい。既存の環境も、とりあえず残しておきたかったので、/usr/bin のrubyをリネームして、シンボリックリンクを張ることにする。

------------------------------------------
mv /usr/bin/ruby /usr/bin/ruby1.8.2
ln -s /usr/local/bin/ruby /usr/bin/ruby
mv /usr/lib/ruby /usr/lib/ruby1.8.2
ln -s /usr/local/lib/ruby /usr/lib/ruby
------------------------------------------

cd /usr/local/bin(enter)
ruby -v (enter)
ruby 1.8.5 が出ればOK


ここで、Universalbinary としてインストールできたか確認

cd /usr/local/bin
file ruby

ruby: Mach-O universal binary with 2 architectures
ruby (for architecture ppc): Mach-O executable ppc
ruby (for architecture i386): Mach-O executable i386

→確認OK


続いて /usr/lib/ruby/1.8/i686-darwin8.8.4 へ
vi rbconfig.rb
CONFIG["CFLAGS"] ="
-arch ppc -g -O2 -pipe -fno-common"
ppc指定 青字追加

rbconfig.rb はBugのことが書いてあるサイトもあり、注意


続いて /usr/src/ruby-oci8-0.1.16 へ
ruby setup.rb config -- --with-instant-client=/usr/local/oracle/instantclient10_1
OK!!(初めて行った。)

make

大量の -arch flag: i386 が出る
-----------------------------------
gcc -I. -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.8.4 -I/usr/src/ruby-oci8-0.1.16/ext/oci8 -DRUBY_EXTCONF_H="extconf.h" -fno-common -arch ppc -g -O2 -pipe -fno-common -I/usr/local/oracle/instantclient10_1/sdk/include -Wall -c attr.c
attr.c: In function 'get_string':
attr.c:242: warning: pointer targets in passing argument 1 of 'rb_str_new' differ in signedness
attr.c: In function 'get_oranum_as_int':
attr.c:278: warning: pointer targets in passing argument 1 of 'rb_cstr2inum' differ in signedness
cc -dynamic -bundle -undefined suppress -flat_namespace -L"/usr/local/lib" -o oci8lib.bundle oci8.o handle.o const.o env.o error.o svcctx.o server.o session.o stmt.o define.o bind.o describe.o descriptor.o param.o lob.o oradate.o oranumber.o ocinumber.o attr.o -L/usr/local/oracle/instantclient10_1 -lclntsh -ldl -lobjc
/usr/bin/ld: warning oci8.o cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: warning handle.o cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: warning const.o cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: warning env.o cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: warning error.o cputype (18, architecture ppc) does not match cputype (7) for specifi
--------------------------------

なんとか行ったので

make install

うまくいったのかな?

3.Rubygemsインストールrubygems-0.8.11.tar0.9.0でうまく行かなかったので 0.8.11にする

macsv1:/usr/src/rubygems-0.8.11 root# ruby setup.rb
---> bin
<--- bin
---> lib
---> lib/rbconfig
<--- lib/rbconfig
---> lib/rubygems
<--- lib/rubygems
<--- lib
---> bin
<--- bin
---> lib
---> lib/rbconfig
<--- lib/rbconfig
---> lib/rubygems
<--- lib/rubygems
<--- lib
rm -f InstalledFiles
---> bin
mkdir -p /usr/local/bin/
install gem /usr/local/bin/
install gem_mirror /usr/local/bin/
install gem_server /usr/local/bin/
install gemlock /usr/local/bin/
install gemri /usr/local/bin/
install gemwhich /usr/local/bin/
install index_gem_repository.rb /usr/local/bin/
install update_rubygems /usr/local/bin/
<--- bin
---> lib
mkdir -p /usr/local/lib/ruby/site_ruby/1.8/
install gemconfigure.rb /usr/local/lib/ruby/site_ruby/1.8/
install rubygems.rb /usr/local/lib/ruby/site_ruby/1.8/
install ubygems.rb /usr/local/lib/ruby/site_ruby/1.8/
---> lib/rbconfig
mkdir -p /usr/local/lib/ruby/site_ruby/1.8/rbconfig
install datadir.rb /usr/local/lib/ruby/site_ruby/1.8/rbconfig
<--- lib/rbconfig
---> lib/rubygems
mkdir -p /usr/local/lib/ruby/site_ruby/1.8/rubygems
install builder.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install cmd_manager.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install command.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install config_file.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install custom_require.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install dependency_list.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install doc_manager.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install format.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install gem_commands.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install gem_openssl.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install gem_runner.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install incremental_fetcher.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install installer.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install loadpath_manager.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install old_format.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install open-uri.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install package.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install remote_installer.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install rubygems_version.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install security.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install source_index.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install specification.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install timer.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install user_interaction.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install validator.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
install version.rb /usr/local/lib/ruby/site_ruby/1.8/rubygems
<--- lib/rubygems
<--- lib

As of RubyGems 0.8.0, library stubs are no longer needed.
Searching $LOAD_PATH for stubs to optionally delete (may take a while)...
...done.
No library stubs found.

Successfully built RubyGem
Name: sources
Version: 0.0.1
File: sources-0.0.1.gem

(注意)ここでLoadErrorが発生したら、rubyのコンパイル失敗です

4.Railsインストールrails1.1.6
updateの場合インストールと同じ方法はNG
macsv1:/usr/local/bin root# gem install rails
ERROR: Error installing gem rails[.gem]: No metadata found!

正しい方法:アンインストールからすること
macsv1:/usr/local/bin root# gem uninstall rails

Attempting to uninstall gem 'rails'
Successfully uninstalled rails version 1.1.6
Remove executables and scripts for
'rails' in addition to the gem? [Yn] y
Removing rails

プロキシを通す。
cd /usr/local/bin(enter)
macsv1:/usr/local/bin root# export http_proxy=http://プロキシサーバーIP:ポート(enter)

macsv1:/usr/local/bin root# gem install rails --include-dependencies
Attempting local installation of 'rails'
Local gem file not found: rails*.gem
Attempting remote installation of 'rails'
Successfully installed rails-1.1.6



完了


ruby intel mac oci失敗

2007-01-04 17:36:04 | Xserver+apache
参考サイト1)oci8 mac os x intel
参考サイト2)Rails & Oracle Client on Mac OS XのStep2を始める

ociの所でエラーが出る。
解決できず....

Ruby/Oci作者の KUBOさんに見てもらいました。
結論は、

残念ですが、Mac OS X の Oracle Instant Client は ppc バイナリなので、
intel 版の ruby には対応していません。

対処方法としては、以下の2つがあります。
・ruby を ppc としてコンパイルする。
Xcode の場合は CFLAGS に -march ppc をつけると ppc バイナリが作成
されるようですが、gcc でのコンパイル方法はわかりません。
・ruby-oci8 はあきらめてサードパーティーのODBCドライバを購入して
ruby-odbc を使用する。
http://www.actualtechnologies.com/

Xcode の場合は mkmf.log に
cputype (18, architecture ppc) does not match cputype (7)
というメッセージが出るので、このメッセージを拾ってエラーメッセージを
変えるようにしていたのですが、gcc の場合はメッセージが何も出ないよう
ですね


とのことです。


Intel Mac
Mac OS X 10.4.8
エラー内容----
macsv1:/usr/src/ruby-oci8-0.1.16 root# ruby setup.rb config -- --with-instant-client=/usr/local/oracle/instantclient10_1/
---> lib
---> lib/DBD
---> lib/DBD/OCI8
<--- lib/DBD/OCI8
<--- lib/DBD
<--- lib
---> ext
---> ext/oci8
/usr/local/bin/ruby /usr/src/ruby-oci8-0.1.16/ext/oci8/extconf.rb --with-instant-client=/usr/local/oracle/instantclient10_1/
checking for gcc... yes
checking for LP64... no
checking for ruby header... ok
checking for OCIInitialize()... no
--------------- common error message --------------
If you use Oracle instant client, try with --with-instant-client.

zip package:
ruby setup.rb config -- --with-instant-client=/path/to/instantclient10_1

rpm package:
ruby setup.rb config -- --with-instant-client

The latest version of oraconf.rb may solve the problem.
http://rubyforge.org/cgi-bin/viewcvs.cgi/ruby-oci8/ext/oci8/oraconf.rb?cvsroot=ruby-oci8&only_with_tag=MAIN

If it could not be solved, send the following information to kubo@jiubao.org.

* error messages except 'common error message'.
* last 100 lines of 'ext/oci8/mkmf.log'.
* results of the following commands:
ruby --version
ruby -r rbconfig -e "p Config::CONFIG['host']"
ruby -r rbconfig -e "p Config::CONFIG['CC']"
ruby -r rbconfig -e "p Config::CONFIG['CFLAGS']"
ruby -r rbconfig -e "p Config::CONFIG['LDSHARED']"
ruby -r rbconfig -e "p Config::CONFIG['LDFLAGS']"
ruby -r rbconfig -e "p Config::CONFIG['DLDFLAGS']"
ruby -r rbconfig -e "p Config::CONFIG['LIBS']"
ruby -r rbconfig -e "p Config::CONFIG['GNU_LD']"
* if you use gcc:
gcc --print-prog-name=ld
gcc --print-prog-name=as
* on platforms which can use both 32bit/64bit binaries:
file $ORACLE_HOME/bin/oracle
file `which ruby`
echo $LD_LIBRARY_PATH
echo $LIBPATH # AIX
echo $SHLIB_PATH # HP-UX
------------------ error message ------------------


Could not compile with Oracle instant client.
You may need to set a environment variable:
DYLD_LIBRARY_PATH=/usr/local/oracle/instantclient10_1/
export DYLD_LIBRARY_PATH

---------------------------------------------------
*** /usr/src/ruby-oci8-0.1.16/ext/oci8/extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=/usr/src/ruby-oci8-0.1.16/ext/oci8
--curdir
--ruby=/usr/local/bin/ruby
--with-instant-client
'system /usr/local/bin/ruby /usr/src/ruby-oci8-0.1.16/ext/oci8/extconf.rb --with-instant-client=/usr/local/oracle/instantclient10_1/' failed
Try 'ruby setup.rb --help' for detailed usage.

DYLD_LIBRARY_PATHのセットは正常にできていますが、読み込みエラーになりました。以下 調査結果↓


* last 100 lines of 'ext/oci8/mkmf.log'.
"gcc -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.8.4 -I/usr/src/ruby-oci8-0.1.16/ext/oci8
-g -O2 -pipe -fno-common -c conftest.c"
checked program was:
/* begin */
1: /*top*/
2: #ifndef __GNUC__
3: # error
4: >>>>>> __GNUC__ undefined <<<<<<
5: #endif
/* end */

"gcc -o conftest -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.8.4 -I/usr/src/ruby-oci8-0.1.1
6/ext/oci8 -g -O2 -pipe -fno-common conftest.c -L"/usr/local/lib" -lruby-static -l
pthread -ldl -lobjc "
checked program was:
/* begin */
1: int main() { return sizeof(long) == 8 ? 0 : 1; }
/* end */

./conftest
have_func: checking for OCIInitialize()... -------------------- no

"gcc -o conftest -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.8.4 -I/usr/src/ruby-oci8-0.1.1
6/ext/oci8 -g -O2 -pipe -fno-common -I/usr/local/oracle/instantclient10_1//sdk/include co
nftest.c -L"/usr/local/lib" -L/usr/local/lib -L/usr/local/oracle/instantclient10_1/
-lclntsh -lruby-static -L/usr/local/lib -L/usr/local/oracle/instantclient10_1/ -lclnts
h -lpthread -ldl -lobjc "
conftest.c: In function 't':
conftest.c:5: error: too few arguments to function 'OCIInitialize'
checked program was:
/* begin */
1: #include <oci.h>
2:
3: /*top*/


* results of the following commands:
ruby --version
ruby -r rbconfig -e "p Config::CONFIG['host']"
ruby -r rbconfig -e "p Config::CONFIG['CC']"
ruby -r rbconfig -e "p Config::CONFIG['CFLAGS']"
ruby -r rbconfig -e "p Config::CONFIG['LDSHARED']"
ruby -r rbconfig -e "p Config::CONFIG['LDFLAGS']"
ruby -r rbconfig -e "p Config::CONFIG['DLDFLAGS']"
ruby -r rbconfig -e "p Config::CONFIG['LIBS']"
ruby -r rbconfig -e "p Config::CONFIG['GNU_LD']"
* if you use gcc:
gcc --print-prog-name=ld
gcc --print-prog-name=as

ruby --version
>ruby 1.8.5 (2006-12-04 patchlevel 2) [i686-darwin8.8.4]
ruby -r rbconfig -e "p Config::CONFIG['host']"
>"i686-apple-darwin8.8.4"
ruby -r rbconfig -e "p Config::CONFIG['CC']"
>"gcc"
ruby -r rbconfig -e "p Config::CONFIG['CFLAGS']"
>"-g -O2 -pipe -fno-common"
ruby -r rbconfig -e "p Config::CONFIG['LDSHARED']"
>"cc -dynamic -bundle -undefined suppress -flat_namespace"
ruby -r rbconfig -e "p Config::CONFIG['LDFLAGS']"
>""
ruby -r rbconfig -e "p Config::CONFIG['DLDFLAGS']"
>""
ruby -r rbconfig -e "p Config::CONFIG['LIBS']"
>"-lpthread -ldl -lobjc "
ruby -r rbconfig -e "p Config::CONFIG['GNU_LD']"
>"no"
gcc -print-prog-name=ld
>ld
gcc -print-prog-name=as
>as