No route matches [GET] "/articles" with wrong path

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).
and creating the app in D:/Rails projects/holapp

Then I try the example

and creating the app in D:/Rails projects/blog

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

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 21 March 2015 at 21:19, Henk T. [email protected] wrote:

Getting Started with Rails — Ruby on Rails Guides
employees_path GET /employees(.:format) employees#index
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…

You will find it difficult to get help if you are working with
Windows, most rails developers use a linux distribution (eg Ubuntu) or
Mac. I strongly advise that you try working with Ubuntu. You can
dual boot the PC or run ubuntu in a virtual machine (VirtualBox or
VMWare for example) on Windows.

However, I will have a go at helping.
The problem suggests that you have started the server from the wrong
directory. How are you starting the server? Copy/paste the output
from starting the server here if you cannot see what is going wrong.

Also what do you see if you run, in the terminal
rake routes
That should show you the routes you have configured in routes.rb.
Finally which version of ruby and rails are you using?
From you application folder:
ruby -v
and
rails -v
will show you.

Colin