Rails4 HelloWorld
http://guides.rubyonrails.org/getting_started.htmlを見ながらRails4でHelloWorldやってみました。
```$ rails new blog $ cd blog $ vi Gemfile(追記) gem ‘execjs’ gem ‘therubyracer’ $ rails server
```$ rails generate controller welcome index
$ vi app/views/welcom/index.html.erb
(全部消して、したのを書く)
<h1>Hello, Rails!</h1>
アプリケーションのホームページにする config/routes.rbを編集する
Blog::Application.routes.draw do
get “welcome/index”
# The priority is based upon order of creation:
# first created -> highest priority.
# …
# You can have the root of your site routed with “root”
# root to: “welcome#index”
これを
Blog::Application.routes.draw do
get “welcome/index”
# The priority is based upon order of creation:
# first created -> highest priority.
# …
# You can have the root of your site routed with “root”
root to: “welcome#index” ⬅コメントはずした
これでhttp://localhost:3000/welcome/index これでも、
http://localhost:3000/これでもアクセスできます。