質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

解決済

1回答

794閲覧

rails sコマンドでサーバーが起動しない

kikuchi.s

総合スコア26

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

0グッド

1クリップ

投稿2019/08/22 09:19

コマンド
rails s
を実行すると下記の内容が表示されます。

ruby

1$ rails s 2Usage: 3 rails new APP_PATH [options] 4 5Options: 6 -r, [--ruby=PATH] # Path to the Ruby binary of your choice 7 # Default: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby 8 -b, [--builder=BUILDER] # Path to a application builder (can be a filesystem path or URL) 9 -m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL) 10 [--skip-gemfile], [--no-skip-gemfile] # Don't create a Gemfile 11 [--skip-bundle], [--no-skip-bundle] # Don't run bundle install 12 -G, [--skip-git], [--no-skip-git] # Skip Git ignores and keeps 13 -O, [--skip-active-record], [--no-skip-active-record] # Skip Active Record files 14 -S, [--skip-sprockets], [--no-skip-sprockets] # Skip Sprockets files 15 -d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc) 16 # Default: sqlite3 17 -j, [--javascript=JAVASCRIPT] # Preconfigure for selected JavaScript library 18 # Default: jquery 19 -J, [--skip-javascript], [--no-skip-javascript] # Skip JavaScript files 20 [--dev], [--no-dev] # Setup the application with Gemfile pointing to your Rails checkout 21 [--edge], [--no-edge] # Setup the application with Gemfile pointing to Rails repository 22 -T, [--skip-test-unit], [--no-skip-test-unit] # Skip Test::Unit files 23 [--old-style-hash], [--no-old-style-hash] # Force using old style hash (:foo => 'bar') on Ruby >= 1.9 24 25Runtime options: 26 -f, [--force] # Overwrite files that already exist 27 -p, [--pretend], [--no-pretend] # Run but do not make any changes 28 -q, [--quiet], [--no-quiet] # Suppress status output 29 -s, [--skip], [--no-skip] # Skip files that already exist 30 31Rails options: 32 -h, [--help], [--no-help] # Show this help message and quit 33 -v, [--version], [--no-version] # Show Rails version number and quit 34 35Description: 36 The 'rails new' command creates a new Rails application with a default 37 directory structure and configuration at the path you specify. 38 39 You can specify extra command-line arguments to be used every time 40 'rails new' runs in the .railsrc configuration file in your home directory. 41 42 Note that the arguments specified in the .railsrc file don't affect the 43 defaults values shown above in this help message. 44 45Example: 46 rails new ~/Code/Ruby/weblog 47 48 This generates a skeletal Rails installation in ~/Code/Ruby/weblog. 49 See the README in the newly created application to get going.

ブラウザで下記アドレスを入力してもデフォルトの画面が表示されない状況です。
http://localhost:3000

初歩的な内容で恐縮ですが、解決方法をご教示いただけますでしょうか。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

rails のアプリケーションを作成してありますか?
rails s でサーバが立ち上がるのは

  1. rails new アプリ名  でアプリケーション開発環境を作り
  2. アプリケーションを(途中まででも)作成し
  3. その Rails root( Gemfileのあるディレクトリ)で rails s した場合です。

質問に書かれた rails の出力は 1,2が行われていないか、rails root でないか、のどちらかです

投稿2019/08/22 09:42

winterboum

総合スコア23284

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

kikuchi.s

2019/08/22 09:57

2が行われいませんでした。 初歩すぎて失礼いたしました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問