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

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

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

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

Q&A

解決済

1回答

2006閲覧

Ruby on Railsについてlocalhost:3000が開けないです、ターミナルでrails s打ったのですがこのように出てきます

kiki142

総合スコア13

Ruby on Rails

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

0グッド

0クリップ

投稿2018/08/27 12:18

Usage:

1 rails new APP_PATH [options] 2 3Options: 4 [--skip-namespace], [--no-skip-namespace] # Skip namespace (affects only isolated applications) 5 -r, [--ruby=PATH] # Path to the Ruby binary of your choice 6 # Default: /Users/名前/.rbenv/versions/2.5.0/bin/ruby 7 -m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL) 8 -d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/postgresql/sqlite3/oracle/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc) 9 # Default: sqlite3 10 [--skip-yarn], [--no-skip-yarn] # Don't use Yarn for managing JavaScript dependencies 11 [--skip-gemfile], [--no-skip-gemfile] # Don't create a Gemfile 12 -G, [--skip-git], [--no-skip-git] # Skip .gitignore file 13 [--skip-keeps], [--no-skip-keeps] # Skip source control .keep files 14 -M, [--skip-action-mailer], [--no-skip-action-mailer] # Skip Action Mailer files 15 -O, [--skip-active-record], [--no-skip-active-record] # Skip Active Record files 16 [--skip-active-storage], [--no-skip-active-storage] # Skip Active Storage files 17 -P, [--skip-puma], [--no-skip-puma] # Skip Puma related files 18 -C, [--skip-action-cable], [--no-skip-action-cable] # Skip Action Cable files 19 -S, [--skip-sprockets], [--no-skip-sprockets] # Skip Sprockets files 20 [--skip-spring], [--no-skip-spring] # Don't install Spring application preloader 21 [--skip-listen], [--no-skip-listen] # Don't generate configuration that depends on the listen gem 22 [--skip-coffee], [--no-skip-coffee] # Don't use CoffeeScript 23 -J, [--skip-javascript], [--no-skip-javascript] # Skip JavaScript files 24 [--skip-turbolinks], [--no-skip-turbolinks] # Skip turbolinks gem 25 -T, [--skip-test], [--no-skip-test] # Skip test files 26 [--skip-system-test], [--no-skip-system-test] # Skip system test files 27 [--skip-bootsnap], [--no-skip-bootsnap] # Skip bootsnap gem 28 [--dev], [--no-dev] # Setup the application with Gemfile pointing to your Rails checkout 29 [--edge], [--no-edge] # Setup the application with Gemfile pointing to Rails repository 30 [--rc=RC] # Path to file containing extra configuration options for rails command 31 [--no-rc], [--no-no-rc] # Skip loading of extra configuration options from .railsrc file 32 [--api], [--no-api] # Preconfigure smaller stack for API only apps 33 -B, [--skip-bundle], [--no-skip-bundle] # Don't run bundle install 34 [--webpack=WEBPACK] # Preconfigure for app-like JavaScript with Webpack (options: react/vue/angular/elm/stimulus) 35 36Runtime options: 37 -f, [--force] # Overwrite files that already exist 38 -p, [--pretend], [--no-pretend] # Run but do not make any changes 39 -q, [--quiet], [--no-quiet] # Suppress status output 40 -s, [--skip], [--no-skip] # Skip files that already exist 41 42Rails options: 43 -h, [--help], [--no-help] # Show this help message and quit 44 -v, [--version], [--no-version] # Show Rails version number and quit 45 46Description: 47 The 'rails new' command creates a new Rails application with a default 48 directory structure and configuration at the path you specify. 49 50 You can specify extra command-line arguments to be used every time 51 'rails new' runs in the .railsrc configuration file in your home directory. 52 53 Note that the arguments specified in the .railsrc file don't affect the 54 defaults values shown above in this help message. 55 56Example: 57 rails new ~/Code/Ruby/weblog 58 59 This generates a skeletal Rails installation in ~/Code/Ruby/weblog. 60コード 61```という文字が出てきてlocalhost:3000にアクセスしようとしても出来ません。申し訳ありませんが教えて頂けるとありがたいです

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

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

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

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

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

guest

回答1

0

ベストアンサー

こんにちは

rails new アプリ名でプロジェクト作成した後、cd プロジェクト名でプロジェクトディレクトリの中に入っていますか?

rails sをどの場所でやっているか確認してみてください

投稿2018/08/27 12:50

FumiakiNakao

総合スコア180

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

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

kiki142

2018/08/27 13:51

コメントありがとうございます、ターミナルでmkdir sampleやcd sampleとかを打ってからrails new sample_appとうって実行しましたがRailsアプリケーションの作成されているか分かりません
FumiakiNakao

2018/08/28 02:46

`rails new sample_app`コマンド で正しくプロジェクトが作成されたならば、カレントディレクトリにsample_appというディレクトリができているはずです `dir`コマンド をうってsample_appが出てくるか確認してみましょう 出てこなかった場合、なんらかの理由でrailsプロジェクトが作成されていません 出てきた場合は`cd sample_app`でプロジェクトディレクトリ内に入ってから`rails s`を実行しましょう
kiki142

2018/08/28 03:32

やはり作成されてませんでした、rails new sample_appと打つと英文字がたくさん出てきたので何らかの原因があるのかもしれません、とりあえず今回は教えて頂いて有難うございました
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問