SitePoint Sponsor

User Tag List

Results 1 to 15 of 15
  1. #1
    SitePoint Member
    Join Date
    Jun 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Error installing SQLite3-ruby gem in Simply Rails 2

    Hi,

    I'm having the following error:

    BIGRINGO-2:sqlite-3.5.4 etiennelg$ sudo gem install sqlite3-ruby
    Building native extensions. This could take a while...
    ERROR: Error installing sqlite3-ruby:
    ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install sqlite3-ruby
    checking for fdatasync() in -lrt... no
    checking for sqlite3.h... yes
    checking for sqlite3_open() in -lsqlite3... no
    *** 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=.
    --curdir
    --ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
    --with-sqlite3-dir
    --without-sqlite3-dir
    --with-sqlite3-include
    --without-sqlite3-include=${sqlite3-dir}/include
    --with-sqlite3-lib
    --without-sqlite3-lib=${sqlite3-dir}/lib
    --with-rtlib
    --without-rtlib
    --with-sqlite3lib
    --without-sqlite3lib


    Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.2.2 for inspection.
    Results logged to /Library/Ruby/Gems/1.8/gems/sqlite3-ruby-1.2.2/ext/sqlite3_api/gem_make.out

    Any help?
    Thanks

  2. #2
    SitePoint Member
    Join Date
    Jun 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You might want to check out this site to see if it doesn't help.
    http://hivelogic.com/articles/2008/0...-rails-leopard

  3. #3
    SitePoint Member
    Join Date
    Jun 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got the exact same error message. Right before this I also noticed that when I checked which version of sqlite was installed, it returned 3.4.0 even though the prompt says sqlite-3.5.4. What is going on?

  4. #4
    SitePoint Member
    Join Date
    Aug 2003
    Location
    Frankfurt, Germany
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by doubledown View Post
    I got the exact same error message. Right before this I also noticed that when I checked which version of sqlite was installed, it returned 3.4.0 even though the prompt says sqlite-3.5.4. What is going on?
    Same for me, it returns 3.4.0

    I installed it here:

    /usr/local/src/sqlite-3.5.4

    Where I had installed things according to hivelogic's instructions, maybe there is some path problem with sqlite3?

    And when I create the table "stories" in the sqlite3 console, in accordance with page 102 in Simply Rails 2, some strange code is created such that Textmate doesn't recognize the file (and of course I can't include it here).

    I am using Leopard 10.5.3 in an iMac PowerPC G5.

    Any guidance would be appreciated. I really like the book and am getting off to a false start with sqlite3!
    Last edited by monck; Jun 14, 2008 at 14:13.

  5. #5
    SitePoint Member
    Join Date
    Aug 2003
    Location
    Frankfurt, Germany
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, just repeated the instructions a few times and moved on with the book and it is working fine...

  6. #6
    SitePoint Member
    Join Date
    Jan 2008
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    I am also have the same problem as above did you just follow the same instructions in the book again and then it worked.

    thanks

  7. #7
    SitePoint Member
    Join Date
    Aug 2003
    Location
    Frankfurt, Germany
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jukebox View Post
    Hi

    I am also have the same problem as above did you just follow the same instructions in the book again and then it worked.

    thanks
    Hi

    Yes. It's good practice: I have deleted the rails "shovell" folder a few times and started again, reading a bit more carefully sometimes!

    The book is good and the instructions work fine.

    One issue for me was that Sqlite3 is new to me.

    Enjoy!

  8. #8
    SitePoint Member
    Join Date
    Jan 2008
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HELP

    I am now getting this message

    92:sqlite-3.5.4 ralph$ make

    rm -rf tsrc
    rm: tsrc/alter.c: Permission denied
    rm: tsrc/analyze.c: Permission denied
    rm: tsrc/attach.c: Permission denied
    rm: tsrc/auth.c: Permission denied
    rm: tsrc/btmutex.c: Permission denied
    rm: tsrc/btree.c: Permission denied
    rm: tsrc/btree.h: Permission denied
    rm: tsrc/btreeInt.h: Permission denied
    rm: tsrc/build.c: Permission denied
    rm: tsrc/callback.c: Permission denied
    rm: tsrc/complete.c: Permission denied
    rm: tsrc/date.c: Permission denied
    rm: tsrc/delete.c: Permission denied
    rm: tsrc/expr.c: Permission denied
    rm: tsrc/fts1.c: Permission denied
    rm: tsrc/fts1.h: Permission denied
    rm: tsrc/fts1_hash.c: Permission denied
    rm: tsrc/fts1_hash.h: Permission denied
    rm: tsrc/fts1_porter.c: Permission denied
    rm: tsrc/fts1_tokenizer.h: Permission denied
    rm: tsrc/fts1_tokenizer1.c: Permission denied
    rm: tsrc/func.c: Permission denied
    rm: tsrc/hash.c: Permission denied
    rm: tsrc/hash.h: Permission denied
    rm: tsrc/insert.c: Permission denied
    rm: tsrc/journal.c: Permission denied
    rm: tsrc/keywordhash.h: Permission denied
    rm: tsrc/legacy.c: Permission denied
    rm: tsrc/loadext.c: Permission denied
    rm: tsrc/main.c: Permission denied
    rm: tsrc/malloc.c: Permission denied
    rm: tsrc/mem1.c: Permission denied
    rm: tsrc/mem2.c: Permission denied
    rm: tsrc/mem3.c: Permission denied
    rm: tsrc/mem4.c: Permission denied
    rm: tsrc/mutex.c: Permission denied
    rm: tsrc/mutex.h: Permission denied
    rm: tsrc/mutex_os2.c: Permission denied
    rm: tsrc/mutex_unix.c: Permission denied
    rm: tsrc/mutex_w32.c: Permission denied
    rm: tsrc/opcodes.c: Permission denied
    rm: tsrc/opcodes.h: Permission denied
    rm: tsrc/os.c: Permission denied
    rm: tsrc/os.h: Permission denied
    rm: tsrc/os_common.h: Permission denied
    rm: tsrc/os_os2.c: Permission denied
    rm: tsrc/os_unix.c: Permission denied
    rm: tsrc/os_win.c: Permission denied
    rm: tsrc/pager.c: Permission denied
    rm: tsrc/pager.h: Permission denied
    rm: tsrc/parse.c: Permission denied
    rm: tsrc/parse.h: Permission denied
    rm: tsrc/pragma.c: Permission denied
    rm: tsrc/prepare.c: Permission denied
    rm: tsrc/printf.c: Permission denied
    rm: tsrc/random.c: Permission denied
    rm: tsrc/select.c: Permission denied
    rm: tsrc/shell.c: Permission denied
    rm: tsrc/sqlite3.h: Permission denied
    rm: tsrc/sqlite3ext.h: Permission denied
    rm: tsrc/sqliteInt.h: Permission denied
    rm: tsrc/sqliteLimit.h: Permission denied
    rm: tsrc/table.c: Permission denied
    rm: tsrc/tclsqlite.c: Permission denied
    rm: tsrc/tokenize.c: Permission denied
    rm: tsrc/trigger.c: Permission denied
    rm: tsrc/update.c: Permission denied
    rm: tsrc/utf.c: Permission denied
    rm: tsrc/util.c: Permission denied
    rm: tsrc/vacuum.c: Permission denied
    rm: tsrc/vdbe.c: Permission denied
    rm: tsrc/vdbe.h: Permission denied
    rm: tsrc/vdbeapi.c: Permission denied
    rm: tsrc/vdbeaux.c: Permission denied
    rm: tsrc/vdbeblob.c: Permission denied
    rm: tsrc/vdbefifo.c: Permission denied
    rm: tsrc/vdbeInt.h: Permission denied
    rm: tsrc/vdbemem.c: Permission denied
    rm: tsrc/vtab.c: Permission denied
    rm: tsrc/where.c: Permission denied
    rm: tsrc: Directory not empty
    make: *** [target_source] Error 1

    Does any one have any ideas????

  9. #9
    SitePoint Member
    Join Date
    Jun 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sudo your command

    sudo 92:sqlite-3.5.4 ralph$ make

    this will give you admin rights (as long as your on Linux or Mac OS X)

  10. #10
    SitePoint Member
    Join Date
    Jun 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I seem to have solved this problem. The command that worked for me was slightly different than the one in the book. Try this:

    $ sudo gem install sqlite3-ruby -- --with-sqlite3-dir=/usr/local/bin

  11. #11
    SitePoint Member
    Join Date
    Jun 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by doubledown View Post
    I got the exact same error message. Right before this I also noticed that when I checked which version of sqlite was installed, it returned 3.4.0 even though the prompt says sqlite-3.5.4. What is going on?
    If you're running Mac Leopard, I think setting the path, as explained on page 23 of the book, will solve your problem regarding the version of sqlite3. The book kind of implies that you can skip this step if you're running Leopard, but I believe that's wrong. In my case, the new version of sqlite3 was getting installed properly, but until I modified the PATH as described on page 23, the system wasn't looking for the new version I had just installed.

    As for installing the SQLite database interface, try this command:

    $ sudo gem install sqlite3-ruby -- --with-sqlite3-dir=/usr/local/bin

  12. #12
    SitePoint Member
    Join Date
    Aug 2003
    Location
    Frankfurt, Germany
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bgiles View Post
    If you're running Mac Leopard, I think setting the path, as explained on page 23 of the book, will solve your problem regarding the version of sqlite3. The book kind of implies that you can skip this step if you're running Leopard, but I believe that's wrong. In my case, the new version of sqlite3 was getting installed properly, but until I modified the PATH as described on page 23, the system wasn't looking for the new version I had just installed.

    As for installing the SQLite database interface, try this command:

    $ sudo gem install sqlite3-ruby -- --with-sqlite3-dir=/usr/local/bin
    Quick question: Following Dan Benjamin's (hivelogic.com) path instructions, I installed sqlite3 in /usr/local/src ... so would that mean that if I were to follow your gem install instructions above, I should modify the path to: /usr/local/src ?

    Thanks...

  13. #13
    SitePoint Member
    Join Date
    Jun 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by monck View Post
    Quick question: Following Dan Benjamin's (hivelogic.com) path instructions, I installed sqlite3 in /usr/local/src ... so would that mean that if I were to follow your gem install instructions above, I should modify the path to: /usr/local/src ?
    Yes, I think so. Try the "which" command:

    $ which sqlite3

    If it returns "/usr/local/src/sqlite3", then that's the path to the version of sqlite running on your system, so that's the path you'll need to specify in the "with-sqlite3-dir" argument. (Minus the trailing "/sqlite3", since you're actually specifying the directory that contains sqlite3.)

    Disclaimier: I'm pretty new at this stuff myself, so I could be wrong, but the results you get should make it pretty obvious whether it worked or not.

  14. #14
    SitePoint Enthusiast
    Join Date
    Jan 2007
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bgiles View Post
    I seem to have solved this problem. The command that worked for me was slightly different than the one in the book. Try this:

    $ sudo gem install sqlite3-ruby -- --with-sqlite3-dir=/usr/local/bin
    This solved my problem.

    I had the same issue described earlier after compiling and installing sqlite 3.5.9 (3.5.4 is in the book, but no longer works because 3.5.9 is the newest) that "sqlite3 --version" was returning 3.4.0 (I'm on OSX 10.5.4) and not the 3.5.9 I just installed.

    The first time I ran "sudo gem install sqlite3-ruby" it installed fine. I later uninstalled it, and tried to reinstall using "sudo gem install sqlite3-ruby" and got the problem described in the first post.

    Running bgiles' command above then solved the problem with sqlite3-ruby gem not installing, and after that, somehow "sqlite3 --version" now also returns 3.5.9. Thanks!

  15. #15
    SitePoint Member
    Join Date
    Aug 2003
    Location
    Frankfurt, Germany
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I meant to thank you, bgiles.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •