Actually, MacBook ordered to live a long time, so I put it on the old beech, Linux Mint

Installed Ruby and Rails proper

The project is created well, but after the launch attempt we get the following (Huge number of lines)

rails aborted! Bundler::GemRequireError: There was an error while trying to load the gem 'uglifier'. Gem Load Error is: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. Backtrace for gem load error is: /home/andrey/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect' /home/andrey/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>' /home/andrey/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>' /home/andrey/.rvm/gems/ruby-2.3.0/gems/uglifier-3.0.1/lib/uglifier.rb:5:in `require' /home/andrey/.rvm/gems/ruby-2.3.0/gems/uglifier-3.0.1/lib/uglifier.rb:5:in `<top (required)>' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `require' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `block (2 levels) in require' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `each' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `block in require' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `each' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `require' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler.rb:102:in `require' /home/andrey/railsnew/omg/config/application.rb:7:in `<top (required)>' /home/andrey/railsnew/omg/Rakefile:4:in `require_relative' /home/andrey/railsnew/omg/Rakefile:4:in `<top (required)>' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load_rakefile' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:686:in `raw_load_rakefile' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:96:in `block in load_rakefile' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:95:in `load_rakefile' /home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/rake_proxy.rb:12:in `block in run_rake_task' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling' /home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/rake_proxy.rb:10:in `run_rake_task' /home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:51:in `run_command!' /home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>' /home/andrey/railsnew/omg/bin/rails:9:in `require' /home/andrey/railsnew/omg/bin/rails:9:in `<top (required)>' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `load' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `call' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/command.rb:7:in `call' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client.rb:30:in `run' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/bin/spring:49:in `<top (required)>' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `load' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `<top (required)>' /home/andrey/railsnew/omg/bin/spring:13:in `require' /home/andrey/railsnew/omg/bin/spring:13:in `<top (required)>' bin/rails:3:in `load' bin/rails:3:in `<main>' Bundler Error Backtrace: /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:89:in `rescue in block (2 levels) in require' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:85:in `block (2 levels) in require' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `each' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `block in require' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `each' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `require' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler.rb:102:in `require' /home/andrey/railsnew/omg/config/application.rb:7:in `<top (required)>' /home/andrey/railsnew/omg/Rakefile:4:in `require_relative' /home/andrey/railsnew/omg/Rakefile:4:in `<top (required)>' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load_rakefile' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:686:in `raw_load_rakefile' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:96:in `block in load_rakefile' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:95:in `load_rakefile' /home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/rake_proxy.rb:12:in `block in run_rake_task' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling' /home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/rake_proxy.rb:10:in `run_rake_task' /home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:51:in `run_command!' /home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>' /home/andrey/railsnew/omg/bin/rails:9:in `require' /home/andrey/railsnew/omg/bin/rails:9:in `<top (required)>' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `load' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `call' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/command.rb:7:in `call' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client.rb:30:in `run' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/bin/spring:49:in `<top (required)>' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `load' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `<top (required)>' /home/andrey/railsnew/omg/bin/spring:13:in `require' /home/andrey/railsnew/omg/bin/spring:13:in `<top (required)>' bin/rails:3:in `load' bin/rails:3:in `<main>' ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. /home/andrey/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect' /home/andrey/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>' /home/andrey/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>' /home/andrey/.rvm/gems/ruby-2.3.0/gems/uglifier-3.0.1/lib/uglifier.rb:5:in `require' /home/andrey/.rvm/gems/ruby-2.3.0/gems/uglifier-3.0.1/lib/uglifier.rb:5:in `<top (required)>' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `require' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `block (2 levels) in require' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `each' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `block in require' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `each' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `require' /home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler.rb:102:in `require' /home/andrey/railsnew/omg/config/application.rb:7:in `<top (required)>' /home/andrey/railsnew/omg/Rakefile:4:in `require_relative' /home/andrey/railsnew/omg/Rakefile:4:in `<top (required)>' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load_rakefile' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:686:in `raw_load_rakefile' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:96:in `block in load_rakefile' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:95:in `load_rakefile' /home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/rake_proxy.rb:12:in `block in run_rake_task' /home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling' /home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/rake_proxy.rb:10:in `run_rake_task' /home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:51:in `run_command!' /home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>' /home/andrey/railsnew/omg/bin/rails:9:in `require' /home/andrey/railsnew/omg/bin/rails:9:in `<top (required)>' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `load' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `call' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/command.rb:7:in `call' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client.rb:30:in `run' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/bin/spring:49:in `<top (required)>' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `load' /home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `<top (required)>' /home/andrey/railsnew/omg/bin/spring:13:in `require' /home/andrey/railsnew/omg/bin/spring:13:in `<top (required)>' bin/rails:3:in `load' bin/rails:3:in `<main>' 

Actually code in heme FILE

 GEM remote: https://rubygems.org/ specs: actioncable (5.0.0.1) actionpack (= 5.0.0.1) nio4r (~> 1.2) websocket-driver (~> 0.6.1) actionmailer (5.0.0.1) actionpack (= 5.0.0.1) actionview (= 5.0.0.1) activejob (= 5.0.0.1) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) actionpack (5.0.0.1) actionview (= 5.0.0.1) activesupport (= 5.0.0.1) rack (~> 2.0) rack-test (~> 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) actionview (5.0.0.1) activesupport (= 5.0.0.1) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) activejob (5.0.0.1) activesupport (= 5.0.0.1) globalid (>= 0.3.6) activemodel (5.0.0.1) activesupport (= 5.0.0.1) activerecord (5.0.0.1) activemodel (= 5.0.0.1) activesupport (= 5.0.0.1) arel (~> 7.0) activesupport (5.0.0.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) minitest (~> 5.1) tzinfo (~> 1.1) arel (7.1.1) builder (3.2.2) byebug (9.0.5) coffee-rails (4.2.1) coffee-script (>= 2.2.0) railties (>= 4.0.0, < 5.2.x) coffee-script (2.4.1) coffee-script-source execjs coffee-script-source (1.10.0) concurrent-ruby (1.0.2) debug_inspector (0.0.2) erubis (2.7.0) execjs (2.7.0) ffi (1.9.14) globalid (0.3.7) activesupport (>= 4.1.0) i18n (0.7.0) jbuilder (2.6.0) activesupport (>= 3.0.0, < 5.1) multi_json (~> 1.2) jquery-rails (4.1.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) loofah (2.0.3) nokogiri (>= 1.5.9) mail (2.6.4) mime-types (>= 1.16, < 4) method_source (0.8.2) mime-types (3.1) mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) mini_portile2 (2.1.0) minitest (5.9.0) multi_json (1.12.1) nio4r (1.2.1) nokogiri (1.6.8) mini_portile2 (~> 2.1.0) pkg-config (~> 1.1.7) pkg-config (1.1.7) puma (3.6.0) rack (2.0.1) rack-test (0.6.3) rack (>= 1.0) rails (5.0.0.1) actioncable (= 5.0.0.1) actionmailer (= 5.0.0.1) actionpack (= 5.0.0.1) actionview (= 5.0.0.1) activejob (= 5.0.0.1) activemodel (= 5.0.0.1) activerecord (= 5.0.0.1) activesupport (= 5.0.0.1) bundler (>= 1.3.0, < 2.0) railties (= 5.0.0.1) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.1) activesupport (>= 4.2.0, < 6.0) nokogiri (~> 1.6.0) rails-html-sanitizer (1.0.3) loofah (~> 2.0) railties (5.0.0.1) actionpack (= 5.0.0.1) activesupport (= 5.0.0.1) method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (11.2.2) rb-fsevent (0.9.7) rb-inotify (0.9.7) ffi (>= 0.5.0) sass (3.4.22) sass-rails (5.0.6) railties (>= 4.0.0, < 6) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) spring (1.7.2) spring-watcher-listen (2.0.0) listen (>= 2.7, < 4.0) spring (~> 1.2) sprockets (3.7.0) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.1.1) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) sqlite3 (1.3.11) thor (0.19.1) thread_safe (0.3.5) tilt (2.0.5) turbolinks (5.0.1) turbolinks-source (~> 5) turbolinks-source (5.0.0) tzinfo (1.2.2) thread_safe (~> 0.1) uglifier (3.0.1) execjs (>= 0.3.0, < 3) web-console (3.3.1) actionview (>= 5.0) activemodel (>= 5.0) debug_inspector railties (>= 5.0) websocket-driver (0.6.4) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) PLATFORMS ruby DEPENDENCIES byebug coffee-rails (~> 4.2) jbuilder (~> 2.5) jquery-rails listen (~> 3.0.5) puma (~> 3.0) rails (~> 5.0.0, >= 5.0.0.1) sass-rails (~> 5.0) spring spring-watcher-listen (~> 2.0.0) sqlite3 turbolinks (~> 5) tzinfo-data uglifier (>= 1.3.0) web-console BUNDLED WITH 1.12.5 

    1 answer 1

    And you do not worry! Read, be aware. Pay attention to this line. It is almost at the top, before it was necessary to read not so much.

    Could not find a javascript runtime. See https://github.com/rails/execjs for a list of available runtimes.

    Follow the link, see the list:

    ExecJS supports these runtimes:

    You need any of them. Currently popular mainly:

    • Node.js (because the front end still needs it all the same)
    • therubyracer (because it, ahem, just a heme, set and ran)
    • Thanks) I installed Node.js separately - and voila, it all worked, but I ran into another interesting bug. I open a new terminal, any functions of rails rails new rails s rake routes Just pour and swear at the lack of access to rubygems.rb - Andrew
    • @Andrew I don’t know how to achieve this. Unless something broke in the RVM files. It’s very likely that reinstalling Ruby will solve this; if not, you have to dig. - D-side
    • reinstalling completely rvm, ruby ​​- did not help, the result is the same ... We have this <internal: gem_prelude>: 1: in require': cannot load such file -- rubygems.rb (LoadError) from <internal:gem_prelude>:1:in <compiled> ' - Andrew
    • @Andrew then ask the question separately. And see if the solutions work out of here . - D-side