Forum: Ruby on Rails oci8 mac os x intel

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ba4b0b302231bffb0f685bbef25db0d6?d=identicon&s=25 Bryan Liles (Guest)
on 2006-04-20 16:34
(Received via mailing list)
Is rails + oci8 + mac os x intel a winning combination?  It appears
that oci8 might be a issue.
D6ae681606a23d4d66fc4ab50a15137f?d=identicon&s=25 Lori Olson (lori)
on 2006-04-20 17:49
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
6ece05caebbfa91944047629101bc5ea?d=identicon&s=25 KUBO Takehiro (Guest)
on 2006-04-21 02:34
(Received via mailing list)
Hi,

Lori Olson <loriolson@labradortechnologies.com> writes:

> 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&...

   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.
Ba4b0b302231bffb0f685bbef25db0d6?d=identicon&s=25 Bryan Liles (Guest)
on 2006-04-24 14:24
(Received via mailing list)
On Apr 20, 2006, at 8:33 PM, KUBO Takehiro wrote:

>> InstantClient).
>> PPC binaries of your entire Ruby/Rails stack, and then run in
> Oracle intant client is still, when I write this, pcc.
>
>    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.
C31c7255fa4488dfc5d766403b497a36?d=identicon&s=25 Jim Morris (wolfmanjm)
on 2006-06-17 06:46
(Received via mailing list)
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?
This topic is locked and can not be replied to.