Forum: Ruby on Rails Help me : problem in running rails application

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
4ee4738527ef6caecc897038bf5c6c30?d=identicon&s=25 vpgholap@gmail.com (Guest)
on 2008-12-23 09:56
(Received via mailing list)
Hello to all ,
I am new in ruby development, so please me, i am asking a very simple
query.

Problem :
I created a simple greeting application

1.  F:\RubyProjects>rails chapterone

2. F:\RubyProjects\chapterone>rails script/generate controller
greeting

3. after that  i edit greeting_controller.rb

class GreetingController < ApplicationController
  def index
    @welcome_message="Welcome to your first rail application"
  end
end


4. then i create a index.html.rb file in app/view/greeting folder

<html>
<body>
<h1><%=@welcome_message %></h1>
</body>
</html>

5. then i open browser http:\\localhost:3000/greeting

here i got a error

   -------------------------------
MissingSourceFile in GreetingController#index


So can any one suggest me , how to get out of this error.


Thank you,
Vikas Gholap.
7de465f222e6a9c7fe658e370d0bfe05?d=identicon&s=25 Paolo Montrasio (pmontrasio)
on 2008-12-23 10:24
vpgholap@gmail.com wrote:

> 4. then i create a index.html.rb file in app/view/greeting folder

I think that this file should be named index.html.erb (.erb, not .rb)

Paolo
This topic is locked and can not be replied to.