Is rails + oci8 + mac os x intel a winning combination? It appears that oci8 might be a issue.
Bryan Liles wrote:> Is rails + oci8 + mac os x intel a winning combination? It appears > that oci8 might be a issue.OCI8 is not really the issue. The issue is that you need an Intel compatible library from Oracle (for example, an Intel version of the InstantClient). Strangely, the Oracle Mac Instant Client DOES work, on it''s own, through the magic of Rosetta. For instance, you can run SQLPLUS. But you can''t, for example, use it with OCI, because OCI compiles as a native Intel binary, and cannot link against the PPC binaries of the Oracle Instant Client. If you REALLY wanted to cripple yourself, you could try to install/build PPC binaries of your entire Ruby/Rails stack, and then run in compatibility (read sloooooow) mode via Rosetta. I wouldn''t recommend it, but you could try. Or production server is RedHat with Oracle, so we do need Oracle. But we made the decision to run with MySQL on our Intel iMacs, and then we have a Continuous Build server that lives on Fedora Core with Oracle XE installed. It catches all the MySQL/Oracle "oops", which aren''t really that bad, after the first week or so ;-) -- Regards, Lori Olson http://blog.dragonsharp.com -- Posted via http://www.ruby-forum.com/.
Hi, Lori Olson <loriolson@labradortechnologies.com> writes:> Bryan Liles wrote: >> Is rails + oci8 + mac os x intel a winning combination? It appears >> that oci8 might be a issue. > > OCI8 is not really the issue. The issue is that you need an Intel > compatible library from Oracle (for example, an Intel version of the > InstantClient). > > Strangely, the Oracle Mac Instant Client DOES work, on it''s own, through > the magic of Rosetta. For instance, you can run SQLPLUS. But you > can''t, for example, use it with OCI, because OCI compiles as a native > Intel binary, and cannot link against the PPC binaries of the Oracle > Instant Client. > > If you REALLY wanted to cripple yourself, you could try to install/build > PPC binaries of your entire Ruby/Rails stack, and then run in > compatibility (read sloooooow) mode via Rosetta. I wouldn''t recommend > it, but you could try.Some people have tried. Here is what I add to the README file in the next ruby-oci8 release. === Intel Mac Oracle intant client is still, when I write this, pcc. 1. check whether the ruby is ppc bianry. file `which ruby` If it is universal bianry, use ditto to extract ppc binary. http://blog.sven-tissot.de/daylist_html?year=2006&month=4&day=12 If it is i386 binary, compie it as ppc. 2. fix compilation flags. ruby -r rbconfig -e "p Config::CONFIG[''CFLAGS'']" ruby -r rbconfig -e "p Config::CONFIG[''DLDLAGS'']" If they have ''-arch i386'', delete it from: /usr/lib/ruby/1.8/powerpc-darwin8.0/rbconfig.rb or /usr/lib/ruby/1.8/universal-darwin8.0/rbconfig.rb If they haven''t ''-arch ppc'', add it. 3. config, make and install ruby setup.rb config -- --with-instant-client=/opt/oracle/instantclient10_1 make make install 4. rollback the changes in 2.
On Apr 20, 2006, at 8:33 PM, KUBO Takehiro wrote:> Hi, > > Lori Olson <loriolson@labradortechnologies.com> writes: > >> Bryan Liles wrote: >>> Is rails + oci8 + mac os x intel a winning combination? It appears >>> that oci8 might be a issue. >> >> OCI8 is not really the issue. The issue is that you need an Intel >> compatible library from Oracle (for example, an Intel version of the >> InstantClient). >> >> Strangely, the Oracle Mac Instant Client DOES work, on it''s own, >> through >> the magic of Rosetta. For instance, you can run SQLPLUS. But you >> can''t, for example, use it with OCI, because OCI compiles as a native >> Intel binary, and cannot link against the PPC binaries of the Oracle >> Instant Client. >> >> If you REALLY wanted to cripple yourself, you could try to install/ >> build >> PPC binaries of your entire Ruby/Rails stack, and then run in >> compatibility (read sloooooow) mode via Rosetta. I wouldn''t >> recommend >> it, but you could try. > > Some people have tried. > > Here is what I add to the README file in the next ruby-oci8 release. > > === Intel Mac > > Oracle intant client is still, when I write this, pcc. > > 1. check whether the ruby is ppc bianry. > > file `which ruby` > > If it is universal bianry, use ditto to extract ppc binary. > > http://blog.sven-tissot.de/daylist_html?year=2006&month=4&day=12 > > If it is i386 binary, compie it as ppc. > > 2. fix compilation flags. > > ruby -r rbconfig -e "p Config::CONFIG[''CFLAGS'']" > ruby -r rbconfig -e "p Config::CONFIG[''DLDLAGS'']" > > If they have ''-arch i386'', delete it from: > /usr/lib/ruby/1.8/powerpc-darwin8.0/rbconfig.rb > or > /usr/lib/ruby/1.8/universal-darwin8.0/rbconfig.rb > > If they haven''t ''-arch ppc'', add it. > > 3. config, make and install > > ruby setup.rb config -- --with-instant-client=/opt/oracle/ > instantclient10_1 > make > make install > > 4. rollback the changes in 2. >That is a great HOWTO. I came up with another solution. I purchased an Oracle ODBC driver from http://www.actualtechnologies.com/ product_oracle.php. I then configured rails to use odbc. I don''t want to run ppc binaries if I don''t have to.
I like this approach, and I got that driver to work on my mactel with ruby, but there are no ODBC Rails adapters. Did you write your own? or did you find one somewhere? For me running Rails/Ruby in PPC mode is not an option. Does anyone know the ETA for Oracle releasing intel versions of their drivers? Bryan Liles wrote:> > On Apr 20, 2006, at 8:33 PM, KUBO Takehiro wrote: > >> Hi, >> >> Lori Olson <loriolson@labradortechnologies.com> writes: >> >>> Bryan Liles wrote: >>>> Is rails + oci8 + mac os x intel a winning combination? It appears >>>> that oci8 might be a issue. >>> >>> OCI8 is not really the issue. The issue is that you need an Intel >>> compatible library from Oracle (for example, an Intel version of the >>> InstantClient). >>> >>> Strangely, the Oracle Mac Instant Client DOES work, on it''s own, through >>> the magic of Rosetta. For instance, you can run SQLPLUS. But you >>> can''t, for example, use it with OCI, because OCI compiles as a native >>> Intel binary, and cannot link against the PPC binaries of the Oracle >>> Instant Client. >>> >>> If you REALLY wanted to cripple yourself, you could try to install/build >>> PPC binaries of your entire Ruby/Rails stack, and then run in >>> compatibility (read sloooooow) mode via Rosetta. I wouldn''t recommend >>> it, but you could try. >> >> Some people have tried. >> >> Here is what I add to the README file in the next ruby-oci8 release. >> >> === Intel Mac >> >> Oracle intant client is still, when I write this, pcc. >> >> 1. check whether the ruby is ppc bianry. >> >> file `which ruby` >> >> If it is universal bianry, use ditto to extract ppc binary. >> >> http://blog.sven-tissot.de/daylist_html?year=2006&month=4&day=12 >> >> If it is i386 binary, compie it as ppc. >> >> 2. fix compilation flags. >> >> ruby -r rbconfig -e "p Config::CONFIG[''CFLAGS'']" >> ruby -r rbconfig -e "p Config::CONFIG[''DLDLAGS'']" >> >> If they have ''-arch i386'', delete it from: >> /usr/lib/ruby/1.8/powerpc-darwin8.0/rbconfig.rb >> or >> /usr/lib/ruby/1.8/universal-darwin8.0/rbconfig.rb >> >> If they haven''t ''-arch ppc'', add it. >> >> 3. config, make and install >> >> ruby setup.rb config -- >> --with-instant-client=/opt/oracle/instantclient10_1 >> make >> make install >> >> 4. rollback the changes in 2. >> > > That is a great HOWTO. I came up with another solution. I purchased an > Oracle ODBC driver from > http://www.actualtechnologies.com/product_oracle.php. I then > configured rails to use odbc. I don''t want to run ppc binaries if I > don''t have to. > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >