0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Windows10でRuby on Railsのサンプルページを開くまで

Last updated at Posted at 2017-04-01

説明

初めてのRuby on Railsです。
前回の続きでサンプルページを開くまで手順です。
(Markdownの書き方も勉強中です。)

環境

モノ バージョン
OS Windows10 Home(64bit)
Ruby 2.2.6
Rails 5.0.2

Railsアプリケーションを作成する

rails new hogehoge
      create
      create  README.md
      create  Rakefile
      create  config.ru
:
(省略)
:
Using rails 5.0.2
Using sass-rails 5.0.6
Bundle complete! 12 Gemfile dependencies, 56 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.

ズラズラーッと何かしら処理されているようだ。

サーバを起動する

hogehogeのフォルダに移動してから~

rails server 
もしくは
ruby bin/rails server
=> Booting Puma
=> Rails 5.0.2 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
*** SIGUSR2 not implemented, signal based restart unavailable!
*** SIGUSR1 not implemented, signal based restart unavailable!
*** SIGHUP not implemented, signal based logs reopening unavailable!
Puma starting in single mode...
* Version 3.8.2 (ruby 2.2.6-p396), codename: Sassy Salamander
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
Use Ctrl-C to stop

このウィンドウはそのままにしておく。
なんかunavailableとかダメっぽいメッセージが出ている。そのうち調べる。

ブラウザで確認してみる

http://localhost:3000

20170401_001.png

素敵なページが開いた。
you're on rails(あなたは軌道に乗っている)google翻訳。
その感じはある。

ここまで。続きはまた次回。


追記。アクセスしたときにログが出力されてた。ふむふむ。

hogehoge\log\development.log
Started GET "/" for ::1 at 2017-04-01 16:05:30 +0900
Processing by Rails::WelcomeController#index as HTML
  Parameters: {"internal"=>true}
  Rendering C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-5.0.2/lib/rails/templates/rails/welcome/index.html.erb
  Rendered C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-5.0.2/lib/rails/templates/rails/welcome/index.html.erb (5.5ms)
Completed 200 OK in 94ms (Views: 47.1ms | ActiveRecord: 0.0ms)

感想

簡単さに驚いた。

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?