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

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

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

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

Q&A

2回答

796閲覧

railsでサーバーがうまく立ち上がりません。

abcdxyx

総合スコア17

Ruby on Rails

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

0グッド

0クリップ

投稿2019/06/16 03:26

前提・実現したいこと

railsでサーバーを立ち上げようとしたところ、エラーが出てきて、立ち上げることが出来ません。

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

何が原因なのかわかりません。すみません。

該当のソースコード

rails new HelloRails exist 省略~~~~ Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. Using rake 12.3.2 Using concurrent-ruby 1.1.5 Using i18n 1.6.0 Using minitest 5.11.3 Using thread_safe 0.3.6 Using tzinfo 1.2.5 Using activesupport 5.2.3 Using builder 3.2.3 Using erubi 1.8.0 Using mini_portile2 2.4.0 Using nokogiri 1.10.3 Using rails-dom-testing 2.0.3 Using crass 1.0.4 Using loofah 2.2.3 Using rails-html-sanitizer 1.0.4 Using actionview 5.2.3 Using rack 2.0.7 Using rack-test 1.1.0 Using actionpack 5.2.3 Using nio4r 2.3.1 Using websocket-extensions 0.1.4 Using websocket-driver 0.7.1 Using actioncable 5.2.3 Using globalid 0.4.2 Using activejob 5.2.3 Using mini_mime 1.0.1 Using mail 2.7.1 Using actionmailer 5.2.3 Using activemodel 5.2.3 Using arel 9.0.0 Using activerecord 5.2.3 Using mimemagic 0.3.3 Using marcel 0.3.3 Using activestorage 5.2.3 Using public_suffix 3.1.0 Using addressable 2.6.0 Using io-like 0.3.0 Using archive-zip 0.12.0 Using bindex 0.7.0 Using msgpack 1.2.10 Using bootsnap 1.4.4 Using bundler 2.0.2 Using byebug 11.0.1 Using regexp_parser 1.5.1 Using xpath 3.2.0 Using capybara 3.24.0 Using childprocess 1.0.1 Using chromedriver-helper 2.1.1 Using coffee-script-source 1.12.2 Using execjs 2.7.0 Using coffee-script 2.4.1 Using method_source 0.9.2 Using thor 0.20.3 Using railties 5.2.3 Using coffee-rails 4.2.2 Using ffi 1.11.1 Using jbuilder 2.9.1 Using rb-fsevent 0.10.3 Using rb-inotify 0.10.0 Using ruby_dep 1.5.0 Using listen 3.1.5 Using puma 3.12.1 Using sprockets 3.7.2 Using sprockets-rails 3.2.1 Using rails 5.2.3 Using rubyzip 1.2.3 Using sass-listen 4.0.0 Using sass 3.7.4 Using tilt 2.0.9 Using sass-rails 5.0.7 Using selenium-webdriver 3.142.3 Using spring 2.1.0 Using spring-watcher-listen 2.0.1 Using sqlite3 1.4.1 Using turbolinks-source 5.2.0 Using turbolinks 5.2.0 Using uglifier 4.1.20 Using web-console 3.7.0 Bundle complete! 18 Gemfile dependencies, 78 gems now installed. Use `bundle info [gemname]` to see where a bundled gem is installed. run bundle exec spring binstub --all * bin/rake: Spring inserted * bin/rails: Spring inserted ~/HelloRails# rails /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/app_loader.rb:53: warning: Insecure world writable dir /root/.rbenv/versions in PATH, mode 040777 The most common rails commands are: generate Generate new code (short-cut alias: "g") console Start the Rails console (short-cut alias: "c") server Start the Rails server (short-cut alias: "s") test Run tests except system tests (short-cut alias: "t") test:system Run system tests dbconsole Start a console for the database specified in config/database.yml (short-cut alias: "db") new Create a new Rails application. "rails new my_app" creates a new application called MyApp in "./my_app" All commands can be run with -h (or --help) for more information. In addition to those commands, there are: Traceback (most recent call last): 70: from bin/rails:3:in `<main>' 69: from bin/rails:3:in `load' 68: from /root/HelloRails/bin/spring:15:in `<top (required)>' 67: from /root/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 66: from /root/.rbenv/versions/2.6.1/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 65: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `<top (required)>' 64: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `load' 63: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/spring-2.1.0/bin/spring:49:in `<top (required)>' 62: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/spring-2.1.0/lib/spring/client.rb:30:in `run' 61: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call' 省略~~~~ require_with_bootsnap_lfi' 3: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require' 2: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<main>' 1: from /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>' /root/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect': Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

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

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

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

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

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

guest

回答2

0

https://qiita.com/azusanakano/items/771dc9919f347de061d7という記事がありましたが、どうでしょうか。

実行環境にもよりますが、
gem 'therubyracer'がないことで rails newが実行できないことがあります。

(docker-compose利用していた際に発生したことがあった)

投稿2019/06/22 07:06

tail12

総合スコア607

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

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

0

最後に

Could not find a JavaScript runtime.

とありますね?これがエラーで、何か必要なソフトウェアがインストールされていないのでは。
Could not find a JavaScript runtime. で検索を掛けてみてはいかがでしょうか。

投稿2019/06/16 09:05

maai

総合スコア463

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

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

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

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問