Your site needs a root of some sort. If some index file does not exist in
public/ (index.html|htm, default.html|htm, etc) then you need to tell your
rails app where to go.

You can do this by editing your routes.rb (found in your config/ folder)
and adding the line

root :to => 'somecontroller#index"

somecontroller represents the controller to use, and index represents the
method that it should handle. typically index is preferred, which will
render index.html.erb

You can find out more about routes by typing

rake routes

in your console.

On Sat, Mar 21, 2015 at 6:19 PM, Henk Toon <[email protected]> wrote:

> Hi,
>
> I completely new in Ruby and rails.
>
> I try to follow the example in
>
> http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/oow10/rubyhol/instructions/rubyrails.htm
> and have still some issues. I get it running but does not see the
> listing is empty (no fields seen).
>
> Then I try try the example
> http://edgeguides.rubyonrails.org/getting_started.html
>
> but when I try to run the application articles
> http://localhost:3000/articles I get the following error:
>
> No route matches [GET] "/articles"
> Rails.root: D:/Rails projects/holapp
>
>  Routes match in priority from top to bottom
> Helper   HTTP Verb   Path   Controller#Action
> Path / Url
> employees_path   GET   /employees(.:format)   employees#index
>   POST   /employees(.:format)   employees#create
> new_employee_path   GET   /employees/new(.:format)   employees#new
> edit_employee_path   GET   /employees/:id/edit(.:format)
> employees#edit
> employee_path   GET   /employees/:id(.:format)   employees#show
>   PATCH   /employees/:id(.:format)   employees#update
>   PUT   /employees/:id(.:format)   employees#update
>   DELETE   /employees/:id(.:format)   employees#destroy
>
> my routes.rb
> Rails.application.routes.draw do
>
>   root 'welcome#index'
>   resources :articles
>
> end
>
> I dont understand why the route display the oracle example project in
> D:/Rails projects/holapp  instead of D:/Rails projects/blog....????
>
> I dont know why it is pointing to the wrong application....
>
> Please help
>
> Regards,
>
> Henk
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/86a78719cd5f46d01ae13e9499cda2ed%40ruby-forum.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAMszB6yNoQZN5vYzDjUs%2BXCvLsBxO84u8ADd13NcOYJxZQ%2BsBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to