SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    May 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simply Rails 2 - Page 102

    Hi, I'm a RoR novice and trying to follow the book to create a table on sqlite3. After I fire up the SQLite console with the 'sqlite3 db/development.sqlite3' command, I see the following:

    SQLite version 3.5.9
    Enter ".help" for instructions
    sqlite>


    I then enter the SQL commands that are in the book to create the table. When I press enter I get the following error.

    Unable to open database "db/development.sqlite3": unable to open database file

    Any suggestions as to what may be wrong? Thanks in advance.

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,426
    Mentioned
    160 Post(s)
    Tagged
    1 Thread(s)
    Hi hiramv, welcome to the forums,

    Are you in the shovell folder when you enter the sqlite console?
    If you have Windows OS, you may need to use a different version of SQLite.

  3. #3
    SitePoint Member
    Join Date
    May 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I guess I missed that part

    Thank you for the quick response. worked perfectly now that I entered the sqlite console from the shovell folder

  4. #4
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Mittineague thanks for answering this question. I was stuck here and so frustrated. The book says to type the command in the "application directory" but doesn't give a path leaving one to guess.

  5. #5
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm having trouble with the same issue. EVen though I change to shovell directory, I'm not exactly sure what's going on..

    once I type something into
    sqlite>

    I get back
    --->

    and no matter what i type afterwards, i can't seem to create a table or even .quit from this line, so i'm unsure what exactly is going on?

    Previously I was getting errors saying I hard syntax errors in my CREATE TABLE statement, but that no longer comes up and I continue to get just this:
    --->


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
  •