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

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

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

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

Ruby on Rails

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

Q&A

2回答

452閲覧

railsサーバーが立てられない

reo00

総合スコア10

Ruby

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

Ruby on Rails

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

0グッド

0クリップ

投稿2019/10/20 11:53

前提・実現したいこと

Railsサーバーを立てたくrails s をターミナルに打ちこん打ところサーバーが立てれずにこうなってしまいます。始めたばかりで闇雲にネットに書いてある対策法を試していったのですがどれもうまくできませんでした。どなたか申し訳ないのですが教えていただけ無いでしょうか?

発生している問題・エラーメッセージ

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/reo/.rbenv/versions/2.6.3/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ソースコード

試したこと

ここに問題に対して試したことを記載してください。
bundle install
bundle update
上記2つを試した場合Could not locate Gemfile
agrant reload
gem 'sqlite3', '~> 1.3.6'
gem list uglifier
補足情報(FW/ツールのバージョンなど)

ここにより詳細な情報を記載してください。

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

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

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

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

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

guest

回答2

0

rails s でサーバが立ち上がるのは、
rails new プロジェクト名
を実行するとできる、プロジェクト名directoryにcdして実行した時です。
ただ、それだけではだめで、railsアプリケーションの最低限の設定をしないと駄目(かも)です。

チュートリアルが色々有るようですから、最初はそれをおさらいするのをおすすめします

投稿2019/10/20 13:12

winterboum

総合スコア23329

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

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

0

カレントディレクトリはどこでコマンドたたいてますか
pwd
をしてみると、そこは
sample_app
のようなアプリのあるディレクトリではない
のでは?

投稿2019/10/20 12:25

s06068

総合スコア17

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問