views:

69

answers:

1

Running: Apache 2.2.3 Ruby 1.8.7 Rails 2.3.4 Passenger 2.2.5

Error message:

/var/www/derscheidfamily/app/controllers/greetings_controller.rb:14: syntax error, unexpected '/', expecting '\n' or ';' 
def app/controllers 
        ^ 
/var/www/derscheidfamily/app/controllers/greetings_controller.rb:20: syntax error, unexpected '/', expecting '\n' or ';' 
def app/helpers 
        ^ 
    Exception class: 
    SyntaxError 
    Application root: 
    /var/www/derscheidfamily

greetings_controller is as follows:

class GreetingsController < ApplicationController
  def hello
  end

  def exists
  end

  def app
  end

  def exists
  end

  def app/controllers
  end

  def exists
  end

  def app/helpers
  end

  def create
  end

  def app/views/greetings
  end

  def exists
  end

  def test/functional
  end

  def create
  end

  def app/controllers/greetings_controller.rb
  end

  def create
  end

  def test/functional/greetings_controller_test.rb
  end

  def create
  end

  def app/helpers/greetings_helper.rb
  end

  def create
  end

  def app/views/greetings/hello.html.erb
  end

end
A: 

These are not valid Ruby method names.

def app/controllers
end

def app/controllers/greetings_controller.rb
end

# etc...

Aside from probably needing to read some documentation, I would strongly suggest that you run this in a clean Rails project:

./script/generate scaffold greetings

And then take a look at what it generates. You can learn a lot about how a basic Rails app is structured that way.

jdl
Wow, that looks a lot more like code, all right! I think I was trying to get too complicated with the original generate scaffolding. Thanks!