SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2009
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    simply rails 2-Defining Relationships Between Objects

    I wanted to do the exercise on page 105, and so I tried every possible way of doing what he said but it kept saying syntax is wrong. I tried the shovell
    prompt and the apps prompt... and I pasted one line, two lines and three lines of the provided commands and all came back wrong syntax, what am I doing wrong?

  2. #2
    SitePoint Zealot phillipus_rex's Avatar
    Join Date
    Jan 2007
    Location
    Silicon Holler
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is your prompt in the root directory of the application? What does it say immediately before the ">" sign when you are typing in your code?
    "Be kind, for everyone you meet is fighting a
    hard battle." -Plato

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2009
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that is my question, at which prompt do I type and what do I type?

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,445
    Mentioned
    160 Post(s)
    Tagged
    1 Thread(s)
    My page numbers seem a few off, so I'm guessing you mean
    Code:
    >> class Story < ActiveRecord::Base; end 
    => nil 
    >> story = Story.new 
    => #<Story id: nil, name: nil, url: nil, created_at: nil, updated_at: nil> 
    >> story.class 
    => Story(id: integer, name: string, link: string, created_at: datetime, updated_at: datetime)
    A page or so back it says
    To enter a Rails console, change to your shovell folder, and enter the command ruby script/console, as shown below. The >>prompt is ready to accept your commands:
    Is that it?

  5. #5
    SitePoint Zealot daveporter's Avatar
    Join Date
    Mar 2002
    Location
    Perth, Western Australia
    Posts
    133
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @4877

    1) What platform are you on ?
    2) What philipus is asking is what does your prompt look like - you should be in the shovell folder - something like this c:\MyRailsApps\shovell
    3) You might also want to check your pathing - is rails installed correctly ?

    HTH Dave

  6. #6
    SitePoint Enthusiast
    Join Date
    Sep 2009
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    winsows vista,. I tried it with the shovell prompt but it said invalad syntax, page 105... how much should I be entering, I tried all different ways


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
  •