I’m working my way through the book, Build Your Own Ruby on Rails Web
Applications (Sitepoint). I have run into a problem in Chapter 6; I
can’t get the ActionController (story.controller.rb) to run correctly.
I keep on getting an error which reads:
SyntaxError in StoryController#new
app/controllers/story_controller.rb:13: parse error, unexpected $,
Since I’m new to RoR, I can’t figure out the error message and correct
the problem. Can someone help me?
Here is the code in the story.controller.rb file:
class StoryController < ApplicationController
@story = Story.find(:first, :order=>‘RAND()’)
@story = Story.new(params[:story])
redirect_to :action => ‘index’
Thanks in advance.