SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Having trouble running a rake command

    Hi everyone,

    I am on page 126 of Patrick Lenz's book. I got to the command where you rake the file to create tables in the database:


    Code:
    $ rake db:migrate

    but i am getting back instead of what should come out:


    Code:
    (in /Users/choward/Shovell)
    ruby: No such file or directory -- ./bin/rake (LoadError)
    rake aborted!
    Don't know how to build task 'db:migrate'
    I have looked at all the rake files, and I am not sure why its telling me this. Does the missing file/directory have to be relative to the Rakefile? I have a file named "rake" thats in the /bin folder.

    Any help is much appreciated.

  2. #2
    SitePoint Evangelist
    Join Date
    Feb 2006
    Location
    Worcs. UK
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First thing to check is that you are running the command in the right place - you need to be in the root of the application you are trying to migrate. If you can do an ls (or dir on Windows) and get a listing of your application's folders (app, components, config, db, doc, lib, log, public, script, test, tmp, and vendor) then you are in the right place and rake db:migrate should work.

  3. #3
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah i am im the right folder, "shovell" when i am running the rake command, but i am getting the same response. This is a bit over my head

  4. #4
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Show us what you get when you use the "ls" or "dir" command in that directory.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  5. #5
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here you go:


    Code:
    macintosh-9:~/shovell choward$ ls
    README          components      doc             public          testdata
    Rakefile        config          lib             script          tmp
    app             db              log             test            vendor

  6. #6
    SitePoint Evangelist
    Join Date
    Feb 2006
    Location
    Worcs. UK
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Then it looks like you are in the right place. The fact that you have a Rails structure there suggests that Ruby and Rails are installed and at least talking to each other.

    I'd suggest this is a permissions issue, but I have no experience with modern Mac OSs so I'm afraid I'll have to bail out at this point. Sorry I can't be of any more assistance.


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
  •