Mac OS X configuration woes

Discussion in 'Ruby' started by Dan Munk, Jan 27, 2006.

  1. Dan Munk

    Dan Munk Guest

    Hello,

    Sorry for the repetitive post, but I've scoured all of the Mac Ruby
    pages and still haven't found a solution to my issue. Up to date
    version of Tiger. I have 1.8.4 installed.

    ruby -v yields:

    ruby 1.8.4 (2005-12-24) [powerpc-darwin8.4.0]

    I have gem installed. gem -v gives me:

    0.8.11

    gem env outputs:

    Rubygems Environment:
    - VERSION: 0.8.11 (0.8.11)
    - INSTALLATION DIRECTORY: /opt/local/lib/ruby/gems/1.8
    - GEM PATH:
    - /opt/local/lib/ruby/gems/1.8
    - REMOTE SOURCES:
    - http://gems.rubyforge.org

    gem list outputs:
    actionmailer (1.1.5)
    Service layer for easy email delivery and testing.

    actionpack (1.11.2)
    Web-flow and rendering framework putting the VC in MVC.

    actionwebservice (1.0.0)
    Web service support for Action Pack.

    activerecord (1.13.2)
    Implements the ActiveRecord pattern for ORM.

    activesupport (1.2.5)
    Support and utility classes used by the Rails framework.

    rails (1.0.0)
    Web-application framework with template engine, control-flow layer,
    and ORM.

    rake (0.7.0)
    Ruby based make-like utility.

    sources (0.0.1)
    This package provides download sources for remote gem installation

    sqlite3-ruby (1.1.0)
    SQLite3/Ruby is a module to allow Ruby scripts to interface with a
    SQLite3 database.

    When I execute:
    irb(main):001:0> require 'sqlite3'

    I get the following:

    LoadError: no such file to load -- sqlite3
    from (irb):1:in `require'
    from (irb):1

    I installed swig using DarwinPorts. Any direction would be greatly
    appreciated.

    Thanks,
    Dan
    Dan Munk, Jan 27, 2006
    #1
    1. Advertising

  2. Dan Munk

    Alex Fenton Guest

    Dan Munk wrote:
    > Hello,


    > When I execute:
    > irb(main):001:0> require 'sqlite3'
    >
    > I get the following:
    >
    > LoadError: no such file to load -- sqlite3
    > from (irb):1:in `require'
    > from (irb):1


    Two suggestions:

    1) It doesn't look like you've loaded rubygems before you tried to load the sqlite3 gem. If you want Ruby to load libraries from gems, say

    require 'rubygems'

    before you try and require sqlite3.

    You can make ruby do this automatically by using environment variable RUBYOPT, but you'll have to enable this yourself on OS X. Check the rubygems docs.

    2) Make sure you have the sqlite3 library itself installed as well as the ruby interface to sqlite3. It's a separate (easy) download and install from sqlite.org

    cheers
    alex
    Alex Fenton, Jan 27, 2006
    #2
    1. Advertising

  3. Dan Munk

    Dan Munk Guest

    Alex Fenton wrote:
    > Dan Munk wrote:
    > > Hello,

    >
    > > When I execute:
    > > irb(main):001:0> require 'sqlite3'
    > >
    > > I get the following:
    > >
    > > LoadError: no such file to load -- sqlite3
    > > from (irb):1:in `require'
    > > from (irb):1

    >
    > Two suggestions:
    >
    > 1) It doesn't look like you've loaded rubygems before you tried to load the sqlite3 gem. If you want Ruby to load libraries from gems, say
    >
    > require 'rubygems'
    >
    > before you try and require sqlite3.
    >
    > You can make ruby do this automatically by using environment variable RUBYOPT, but you'll have to enable this yourself on OS X. Check the rubygems docs.
    >
    > 2) Make sure you have the sqlite3 library itself installed as well as the ruby interface to sqlite3. It's a separate (easy) download and install from sqlite.org
    >
    > cheers
    > alex


    Thanks for responding. If I can use the sqlite3 command to view and
    modify existing databases do I still need to install the sqlite3
    interface? In the gem list it appears that I have the ruby interface
    installed, is that not the case?

    Thanks again,

    Dan
    Dan Munk, Jan 27, 2006
    #3
  4. Dan Munk

    Alex Fenton Guest

    Dan Munk wrote:
    > If I can use the sqlite3 command to view and
    > modify existing databases do I still need to install the sqlite3
    > interface?


    Maybe. The command-line tool and the shared library aren't the same thing. Check in likely lib directories (below is on OS X 10.3 with sqlite and sqlite3 libs compiled from source)

    SCIPIUS:~alex$ ls /usr/local/lib/libsql*
    /usr/local/lib/libsqlite.0.8.6.dylib /usr/local/lib/libsqlite3.0.8.6.dylib
    /usr/local/lib/libsqlite.0.dylib /usr/local/lib/libsqlite3.0.dylib
    /usr/local/lib/libsqlite.a /usr/local/lib/libsqlite3.a
    /usr/local/lib/libsqlite.dylib /usr/local/lib/libsqlite3.dylib
    /usr/local/lib/libsqlite.la /usr/local/lib/libsqlite3.la

    > In the gem list it appears that I have the ruby interface
    > installed, is that not the case?


    Yes.

    alex
    Alex Fenton, Jan 28, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark
    Replies:
    0
    Views:
    808
  2. Roman =?ISO-8859-15?Q?Bl=F6th?=

    Senseless rendering: Mac.Mozilla != Mac.Netscape6.01 ?!?!

    Roman =?ISO-8859-15?Q?Bl=F6th?=, Jul 2, 2003, in forum: HTML
    Replies:
    1
    Views:
    995
    Steve Pugh
    Jul 2, 2003
  3. mangm
    Replies:
    2
    Views:
    739
    mangm
    Dec 1, 2005
  4. K Richard Pixley
    Replies:
    3
    Views:
    342
    Ned Deily
    Jan 3, 2012
  5. Steven R.
    Replies:
    13
    Views:
    201
    Elliot Temple
    Jul 15, 2006
Loading...

Share This Page