SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: sqlite3 problem

  1. #1
    SitePoint Member
    Join Date
    Jul 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    sqlite3 problem

    I just started my rails shovell application. When I point my browser to http:localhost:3000/[/url] and click on Welcome Aboard: About Your Application's Environment I get the following error instead of the version list mentioned in the book:

    MissingSourceFile in Rails/infoController#properties

    no such file to load -- sqlite3/database

    RAILS_ROOT: /home/mike/RailsApps/shovell
    Application Trace | Framework Trace | Full Trace


    This error occurred while loading the following files:
    sqlite3
    sqlite3/database

    Any ideas?

  2. #2
    SitePoint Member
    Join Date
    Oct 2007
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you installed sqlite3?

    Try running "sudo gem install sqlite3-ruby" and then trying again (This may only work if you have the correct development tools installed - are you on Linux, MacOSX or Windows?)

  3. #3
    SitePoint Member
    Join Date
    Jul 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm on Linux and already installed sqlite3-ruby.

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,461
    Mentioned
    160 Post(s)
    Tagged
    1 Thread(s)
    While in the /home/mike/RailsApps directory, did you use the ruby command
    rails shovell
    to create the shovell directory?
    And your
    database.yml
    file is OK?

  5. #5
    SitePoint Member
    Join Date
    Aug 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was having the same problem. Came across this post elsewhere in the forum:

    I had the 1.2.2 version of sqlite3-ruby. I did:

    sudo gem uninstall sqlite3-ruby
    and then
    sudo gem install sqlite3-ruby -v=1.2.1

    (I use a Mac and had to preface both commands with "sudo")
    Basically, he rolled sqlite3-ruby back from version 1.2.2 to 1.2.1.

    That fixed it for me.

  6. #6
    SitePoint Zealot MystaMax's Avatar
    Join Date
    Apr 2003
    Location
    Atlanta
    Posts
    158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is a permissions issue with the sqlite3 1.2.2 gem. I had the same problem today on ubuntu 8.04. To fix follow the steps below:

    1. navigate to /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2

    Code:
    cd /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2
    2. you have to change the permissions of the files in this directory, use the snippet below:

    Code:
    sudo find . -perm 0662 -exec chmod 664 {} \;
    The above works for MacOSX as well. The gems folder is at a different location:

    Code:
    /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.2
    Now there is no need to unistall 1.2.2 and install 1.2.1!

    Sources for fix:
    Ubuntu - http://www.red91.com/2008/07/20/no-s...lite3-database
    MacOSX - http://www.icoretech.org/2008/07/06/...lite3-database

    Hope this saves someone some trouble, I was about to pull my hair out. I've got dreds, lol.


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
  •