You shouldn’t be using the index.html file in the public folder inside
your
application’s root directory. This is just something to display for when
you
have nothing at the beginning.
In your config/routes.rb I’m guessing you’ve defined something like:
map.connect ‘’, :controller => “welcome”
Because that is what’s commented out by default in the config/routes.rb
file.
The error you’re getting is generated from Rails looking for a
controller
file called “welcome_controller.rb” in app/controllers, the file is not
there and Rails throws a nice error. To generate the controller type
script/generate controller welcome.
As of Rails 2.0 controller names should be pluralized. This is extremely
helpful for when you get to “RESTful Routing” because typing out stuff
like
new_post_comment_path is much better than :controller => “comments”,
:action
=> “new”, :post_id =>
depending on what kind of application you’re making, think of what the
first
object should be and pluralize the name, and type script/generate
controller
<object’s pluralized name>. You will also need to generate a model for
your
object, and this name should be singular.
On Dec 11, 2007 10:21 AM, Mike [email protected] wrote:
“uninitialized constant WelcomeController”
What should I be doing differently?
Thanks,
Mike
–
Ryan B.
http://www.frozenplague.net