V
V
Vlad_Radigin2018-10-10 08:00:39
Ruby on Rails
Vlad_Radigin, 2018-10-10 08:00:39

There is an error when starting the server on rails, how to fix it?

After command rails server
The following error appears ->
C:\Users\HP-PC\Desktop\qqq\simple_blog>rails server
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15 .3/lib/bundler/runtime.rb:85:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError)
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:
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect'
C: /RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `'
C:/RailsInstaller/Ruby2.3.3/lib/ruby /gems/2.3.0/gems/uglifier-4.1.19/lib/uglifier.rb:5:in `require'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/uglifier- 4.1.19/lib/uglifier.rb:5:in `'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb: 82:in `require'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:82:in `block (2 levels) in require'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:77:in `each'
C:/RailsInstaller/Ruby2 .3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:77:in `block in require'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:66:in `each'
C:/RailsInstaller/Ruby2.3.3/ lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:66:in `require'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0 /gems/bundler-1.15.3/lib/bundler.rb:108:in `require'
C:/Users/HP-PC/Desktop/qqq/simple_blog/config/application.rb:7:in `'
C:/ RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:133:in `require'
C:/RailsInstaller/Ruby2.3.3 /lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:133:in `block in perform'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in `tap'
C:/RailsInstaller/ Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in `perform'
C:/RailsInstaller/Ruby2.3.3/lib /ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/ gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib /thor.rb:387:in `dispatch'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/command/base.rb:63: in `perform'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/command.rb:44:in `invoke'
C:/RailsInstaller/Ruby2.3.3/ lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/commands.rb:16:in `'
bin/rails:4:in `require'
bin/rails:4:in `'
Bundler Error Backtrace:
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:77:in `each'
from C:/RailsInstaller/ Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:77:in `block in require'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:66:in `each'
from C:/RailsInstaller/Ruby2. 3.3/lib/ruby/gems/2.3.0/gems/bundler-1.15.3/lib/bundler/runtime.rb:66:in `require'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/ 2.3.0/gems/bundler-1.15.3/lib/bundler.rb:108:in `require'
from C:/Users/HP-PC/Desktop/qqq/simple_blog/config/application.rb:7:in ` '
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:133:in `require'
from C: /RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:133:in `block in perform'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in `tap'
from C:/ RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in `perform'
from C:/RailsInstaller/Ruby2. 3.3/lib/ruby/gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/ 2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/thor- 0.20.0/lib/thor.rb:387:in `dispatch'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/command/ base.rb:63:in `perform'
from C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/command.rb:44:in `invoke'
from C:/RailsInstaller/Ruby2. 3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.6/lib/rails/commands.rb:16:in `'
from bin/rails:4:in `require'
from bin/rails:4 :in `'
Can you please tell me how to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Mirilaczvili, 2018-10-10
@Vlad_Radigin

Install Node.js (msi). It is required for compiling JS.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question