# ask ruby LOCALHOST

**URL:** <https://discuss.rubyonrails.org/t/ask-ruby-localhost/71482>\
**Category:** rubyonrails-talk\
**Created:** [December 27, 2015, 2:55am UTC](https://discuss.rubyonrails.org/t/ask-ruby-localhost/71482 "2015-12-27T02:55:06Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![willy\_wang](https://avatars.discourse-cdn.com/v4/letter/w/9e8a1a/32.png) [@willy\_wang](https://discuss.rubyonrails.org/u/willy_wang)\
**Post date:** [December 27, 2015, 2:55am UTC](https://discuss.rubyonrails.org/t/ask-ruby-localhost/71482/1 "2015-12-27T02:55:06Z")

</div>

# Routing Error

hello there, im willy, i just trying use ruby for first time a have problem when i make directory,

i follow the video tutor from M. Hartl , i can open the localhost:3000 but when i go deeper and make directory D:\RailsInstaller\toy\_app\app\views\users

i open localhost:3000/users and show like this

## No route matches [GET] “/Users”

`Rails.root: D:/RailsInstaller/toy_app`

``

`any advice ? `

`sry bad english `

---

<div class="post-metadata">

**Author:** ![James\_Jelinek](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@James\_Jelinek](https://discuss.rubyonrails.org/u/James_Jelinek)\
**Post date:** [December 27, 2015, 1:28pm UTC](https://discuss.rubyonrails.org/t/ask-ruby-localhost/71482/2 "2015-12-27T13:28:00Z")

</div>

It looks like you created a view folder but do not have a controller action or route to match. You’ll want to setup a route on config/routes.rb to match a controller action. The tutorial should walk you through this but you can also see the routing guide in the rails guides on [rubyonrails.org](http://rubyonrails.org).

---

<div class="post-metadata">

**Author:** ![willy\_wang](https://avatars.discourse-cdn.com/v4/letter/w/9e8a1a/32.png) [@willy\_wang](https://discuss.rubyonrails.org/u/willy_wang)\
**Post date:** [December 28, 2015, 8:21am UTC](https://discuss.rubyonrails.org/t/ask-ruby-localhost/71482/3 "2015-12-28T08:21:40Z")

</div>

hai , when i wanna open localhost:3000/toy\_app show like this

its my routes Rails.application.routes.draw do get ‘toyapp/index’

resources :users

it’s my toyapp\_controller class ToyappController \< ApplicationController def index end end

gem file source ‘[https://rubygems.org](https://rubygems.org)’

# Bundle edge Rails instead: gem ‘rails’, github: ‘rails/rails’

gem ‘rails’, ‘4.2.5’

# Use sqlite3 as the database for Active Record

gem ‘sqlite3’

# Use SCSS for stylesheets

gem ‘sass-rails’, ‘~\> 5.0’

# Use Uglifier as compressor for JavaScript assets

gem ‘uglifier’, ‘\>= 1.3.0’

# Use CoffeeScript for .coffee assets and views

gem ‘coffee-rails’, ‘~\> 4.1.0’

# See [GitHub - rails/execjs: Run JavaScript code from Ruby](https://github.com/rails/execjs#readme) for more supported runtimes

# gem ‘therubyracer’, platforms: :ruby

# Use jquery as the JavaScript library

gem ‘jquery-rails’

# Turbolinks makes following links in your web application faster. Read more: [GitHub - turbolinks/turbolinks-classic: Classic version of Turbolinks. Now deprecated in favor of Turbolinks 5.](https://github.com/rails/turbolinks)

gem ‘turbolinks’

# Build JSON APIs with ease. Read more: [GitHub - rails/jbuilder: Jbuilder: generate JSON objects with a Builder-style DSL](https://github.com/rails/jbuilder)

gem ‘jbuilder’, ‘~\> 2.0’

# bundle exec rake doc:rails generates the API under doc/api.

gem ‘sdoc’, ‘~\> 0.4.0’, group: :doc

# Use ActiveModel has\_secure\_password

# gem ‘bcrypt’, ‘~\> 3.1.7’

# Use Unicorn as the app server

# gem ‘unicorn’

# Use Capistrano for deployment

# gem ‘capistrano-rails’, group: :development

group :development, :test do

# Call ‘byebug’ anywhere in the code to stop execution and get a debugger console

gem ‘byebug’ end

group :development do

# Access an IRB console on exception pages or by using \<%= console %\> in views

gem ‘web-console’, ‘~\> 2.0’ end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem

gem ‘tzinfo-data’, platforms: [:mingw, :mswin, :x64\_mingw, :jruby]

---

<div class="post-metadata">

**Author:** ![Colin\_Law](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@Colin\_Law](https://discuss.rubyonrails.org/u/Colin_Law)\
**Post date:** [December 28, 2015, 8:34am UTC](https://discuss.rubyonrails.org/t/ask-ruby-localhost/71482/4 "2015-12-28T08:34:42Z")

</div>

What happens if you open localhost:3000

Colin

---

<div class="post-metadata">

**Author:** ![willy\_wang](https://avatars.discourse-cdn.com/v4/letter/w/9e8a1a/32.png) [@willy\_wang](https://discuss.rubyonrails.org/u/willy_wang)\
**Post date:** [December 28, 2015, 8:38am UTC](https://discuss.rubyonrails.org/t/ask-ruby-localhost/71482/5 "2015-12-28T08:38:24Z")

</div>

Hello Colin

its show ruby welcome aboard

Welcome aboard You’re riding Ruby on Rails! About your application’s environment

i’m using windows 7,

W.Wang

---

<div class="post-metadata">

**Author:** ![Colin\_Law](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@Colin\_Law](https://discuss.rubyonrails.org/u/Colin_Law)\
**Post date:** [December 28, 2015, 8:42am UTC](https://discuss.rubyonrails.org/t/ask-ruby-localhost/71482/6 "2015-12-28T08:42:23Z")

</div>

When you run rails s it starts the server for the app in that folder, so the welcome aboard page is coming from that app.

Colin

---

<div class="post-metadata">

**Author:** ![willy\_wang](https://avatars.discourse-cdn.com/v4/letter/w/9e8a1a/32.png) [@willy\_wang](https://discuss.rubyonrails.org/u/willy_wang)\
**Post date:** [December 28, 2015, 9:13am UTC](https://discuss.rubyonrails.org/t/ask-ruby-localhost/71482/7 "2015-12-28T09:13:33Z")

</div>

yes it working when i wanna just localhost:3000 but when i wanna open dir app …app/view/users

thats gonna show

> Showing D:/RailsInstaller/toy\_app/app/views/layouts/application.html.erb where line #5 raised:
> 
> TypeError: Object doesn’t support this property or method
> 
> Rails.root: D:/RailsInstaller/toy\_app

any advice ?

i follow the instruction ruby on capter toyapp

---

<div class="post-metadata">

**Author:** ![Colin\_Law](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@Colin\_Law](https://discuss.rubyonrails.org/u/Colin_Law)\
**Post date:** [December 28, 2015, 9:23am UTC](https://discuss.rubyonrails.org/t/ask-ruby-localhost/71482/8 "2015-12-28T09:23:40Z")

</div>

Which version of rail (rails -v) and ruby (ruby -v) are you using and which versions does the tutorial expect?

Also copy/paste the offending file (app/views/layouts/application.html.erb) here.

Colin

---

<div class="post-metadata">

**Author:** ![willy\_wang](https://avatars.discourse-cdn.com/v4/letter/w/9e8a1a/32.png) [@willy\_wang](https://discuss.rubyonrails.org/u/willy_wang)\
**Post date:** [December 28, 2015, 9:29am UTC](https://discuss.rubyonrails.org/t/ask-ruby-localhost/71482/9 "2015-12-28T09:29:04Z")

</div>

rails version 4.2.5 ruby version 2.1.5p273 (2014-11-13 revision 48405) tutorial suggest rails v is 4.2.0

here the app/views/layouts/application.html.erb

\<!DOCTYPE html\> \<html\> \<head\> &nbsp;&nbsp;\<title\>ToyApp\</title\> &nbsp;&nbsp;\<%= stylesheet\_link\_tag 'application', media: 'all', 'data-turbolinks-track' =\> true %\> &nbsp;&nbsp;\<%= javascript\_include\_tag 'application', 'data-turbolinks-track' =\> true %\> &nbsp;&nbsp;\<%= csrf\_meta\_tags %\> \</head\> \<body\>

\<%= yield %\>

\</body\> \</html\>

Kindly regards Willy Wang

---

<div class="post-metadata">

**Author:** ![willy\_wang](https://avatars.discourse-cdn.com/v4/letter/w/9e8a1a/32.png) [@willy\_wang](https://discuss.rubyonrails.org/u/willy_wang)\
**Post date:** [December 28, 2015, 9:37am UTC](https://discuss.rubyonrails.org/t/ask-ruby-localhost/71482/10 "2015-12-28T09:37:32Z")

</div>

hai Colin

it's can be work now, with remove the JS script

&nbsp;&nbsp;\<%= stylesheet\_link\_tag 'application', media: 'all', 'data-turbolinks-track' =\> true %\> &nbsp;&nbsp;\<%= javascript\_include\_tag 'application', 'data-turbolinks-track' =\> true %\>

scourge : [Basic Hello, Rails! not working - Stack Overflow](http://stackoverflow.com/questions/20751397/basic-hello-rails-not-working)

thanks pal

but did u know why must delete the js script ?

---

<div class="post-metadata">

**Author:** ![Colin\_Law](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@Colin\_Law](https://discuss.rubyonrails.org/u/Colin_Law)\
**Post date:** [December 28, 2015, 10:04am UTC](https://discuss.rubyonrails.org/t/ask-ruby-localhost/71482/11 "2015-12-28T10:04:19Z")

</div>

In the stackoverflow question it says the error is in welcome.js.coffee which you did not tell us here (assuming your error was the same). The suggestion there is that it is a windows issue, in which case definitely the best thing is to switch to a linux distribution such as Ubuntu. Very few developers use Windows for Rails and you will find it difficult to get help.

You might like to try the railstutorial.org tutorial (which is free to use online) as it will run in the cloud and does not need you to install anything. Then when you have done that you will have a better idea of the issues.

Colin
