Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9157283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:58:39+00:00 2026-06-17T12:58:39+00:00

I am going through this tutorial: http://edgeguides.rubyonrails.org/getting_started.html One thing I will mention is that

  • 0

I am going through this tutorial: http://edgeguides.rubyonrails.org/getting_started.html
One thing I will mention is that I think I am using a different version of Rails to the tutorial. I am using version 2.3.14
I am working on a Linux system. I set up a rails project thus:

rails myproject

WHich set up lots of directories and files as the tutorial said (although the tutorial uses slightly different commands)

Next, I set up my first app by creating a COntroller and View as follows:

ruby script/generate controller welcome index

This created files int he app directory of my project, in the controllers and views subdirectories. Namely, I know have the file index.html.erb in the views directory.

Next I just wanted to test the server:

ruby script/server

And then in my browser went to localhost:3000, which took me to the index.html file in the public directory.

This is where things go wrong. I want to be directed to the index.html.erb file in the views subdirectory. So, I went to config and opened the routes.rb file for editing. The following is my edited file:

ActionController::Routing::Routes.draw do |map|
  # The priority is based upon order of creation: first created -> highest priority.

  # Sample of regular route:
  #   map.connect 'products/:id', :controller => 'catalog', :action => 'view'
  # Keep in mind you can assign values other than :controller and :action

  # Sample of named route:
  #   map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
  # This route can be invoked with purchase_url(:id => product.id)

  # Sample resource route (maps HTTP verbs to controller actions automatically):
  #   map.resources :products

  # Sample resource route with options:
  #   map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }

  # Sample resource route with sub-resources:
  #   map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller

  # Sample resource route with more complex sub-resources
  #   map.resources :products do |products|
  #     products.resources :comments
  #     products.resources :sales, :collection => { :recent => :get }
  #   end

  # Sample resource route within a namespace:
  #   map.namespace :admin do |admin|
  #     # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
  #     admin.resources :products
  #   end

  # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
   map.root :controller => "welcome#index"#I CHANGED THIS LINE

  # See how all your routes lay out with "rake routes"

  # Install the default routes as the lowest priority.
  # Note: These default routes make all actions in every controller accessible via GET requests. You should
  # consider removing or commenting them out if you're using named routes and resources.
  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'
end

I only made one change in the file. All I did was uncomment the line

map.root :controller => "welcome#index"

And point it to my index.html.erb file (at least that is what I think I am doing).
Restarting the server still sends me to index.html (in public directory). So I deleted the file. Killed the server, restarted. Now I get an error message. I cannot read my index.html.erb file. I would like any help in fixing this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T12:58:41+00:00Added an answer on June 17, 2026 at 12:58 pm

    There are some major differences in rails 2.x and rails 3.x. If you are following the edgerails tutorial, then that is 3.x. Install the new version of rails. You should then have no trouble following the examples in the tutorial.

    Edit: In fact, the installation instructions are in the tutorial itself. If you are having trouble installing ruby 1.9, I rather like rbenv for managing ruby versions. RVM is perhaps the more popular tool for this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm going through this tutorial from droid draw: http://www.droiddraw.org/tutorial3.html I'm getting this error when
I am going through this tutorial http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/tutorials/wiki2/index.html and I would like to see which
I am going through this tutorial http://www.9lessons.info/2009/04/exactly-twitter-like-follow-and-remove.html on how to implement a twitter-like follow/unfollow
I'm going through this tutorial: http://tutorials.jumpstartlab.com/projects/jsattend.html In iteration 7, step 3 we get to
I been going through this tutorial http://www.codeproject.com/KB/linq/BulkOperations_LinqToSQL.aspx and them make a SP like this
I am going through this tutorial: http://blog.assimov.net/blog/2011/04/03/multi-file-upload-with-uploadify-and--carrierwave-on-rails-3/ One of the lines of code is:
tutorial: http://www.jamesyu.org/2011/01/27/cloudedit-a-backbone-js-tutorial-by-example/ I am going through the CloudEdit rails/backbone.js tutrorial and got stuck on
I am going through the Google Cloud Services tutorial here: http://developer.android.com/guide/google/gcm/gs.html And they suggest
I followed went through some related threads and also followed the tutorial on http://www.quirksmode.org/js/cookies.html
I am going through this WPF tutorial http://blogs.vertigo.com/personal/alanl/Blog/Lists/Posts/Post.aspx?ID=18 and I have a question about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.