So I was following the guide on how to get every up and running. It seemed like everything was going smoothly, until I tried to run the test app to see if everything was correct.
sam@Sam:~/railsbridge/test_app$ rails server
/home/sam/.rvm/rubies/ruby-2.3.7/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:84: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:
/home/sam/.rvm/gems/ruby-2.3.7/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in
autodetect'
/home/sam/.rvm/gems/ruby-2.3.7/gems/execjs-2.7.0/lib/execjs.rb:5:in <module:ExecJS>'
/home/sam/.rvm/gems/ruby-2.3.7/gems/execjs-2.7.0/lib/execjs.rb:4:in
'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in require'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in
block in require_with_bootsnap_lfi'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in register'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in
require_with_bootsnap_lfi'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in require'
/home/sam/.rvm/gems/ruby-2.3.7/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in
block in require'
/home/sam/.rvm/gems/ruby-2.3.7/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in load_dependency'
/home/sam/.rvm/gems/ruby-2.3.7/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in
require'
/home/sam/.rvm/gems/ruby-2.3.7/gems/uglifier-4.1.11/lib/uglifier.rb:5:in <main>'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:71:in
require'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:71:in block in require_with_bootsnap_lfi'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in
register'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:70:in require_with_bootsnap_lfi'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:79:in
require'
/home/sam/.rvm/rubies/ruby-2.3.7/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:81:in block (2 levels) in require'
/home/sam/.rvm/rubies/ruby-2.3.7/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:76:in
each'
/home/sam/.rvm/rubies/ruby-2.3.7/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:76:in block in require'
/home/sam/.rvm/rubies/ruby-2.3.7/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:65:in
each'
/home/sam/.rvm/rubies/ruby-2.3.7/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:65:in require'
/home/sam/.rvm/rubies/ruby-2.3.7/lib/ruby/site_ruby/2.3.0/bundler.rb:114:in
require'
/home/sam/railsbridge/test_app/config/application.rb:7:in <main>'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in
require'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in block in require_with_bootsnap_lfi'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in
register'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in require_with_bootsnap_lfi'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in
require'
/home/sam/.rvm/gems/ruby-2.3.7/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in block in require'
/home/sam/.rvm/gems/ruby-2.3.7/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in
load_dependency'
/home/sam/.rvm/gems/ruby-2.3.7/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in require'
/home/sam/.rvm/gems/ruby-2.3.7/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:145:in
block in perform'
/home/sam/.rvm/gems/ruby-2.3.7/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in tap'
/home/sam/.rvm/gems/ruby-2.3.7/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in
perform'
/home/sam/.rvm/gems/ruby-2.3.7/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
/home/sam/.rvm/gems/ruby-2.3.7/gems/thor-0.20.0/lib/thor/invocation.rb:126:in
invoke_command'
/home/sam/.rvm/gems/ruby-2.3.7/gems/thor-0.20.0/lib/thor.rb:387:in dispatch'
/home/sam/.rvm/gems/ruby-2.3.7/gems/railties-5.2.0/lib/rails/command/base.rb:65:in
perform'
/home/sam/.rvm/gems/ruby-2.3.7/gems/railties-5.2.0/lib/rails/command.rb:46:in invoke'
/home/sam/.rvm/gems/ruby-2.3.7/gems/railties-5.2.0/lib/rails/commands.rb:18:in
'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in require'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in
block in require_with_bootsnap_lfi'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in register'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in
require_with_bootsnap_lfi'
/home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in require'
/home/sam/.rvm/gems/ruby-2.3.7/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in
block in require'
/home/sam/.rvm/gems/ruby-2.3.7/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in load_dependency'
/home/sam/.rvm/gems/ruby-2.3.7/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in
require'
/home/sam/railsbridge/test_app/bin/rails:9:in <top (required)>'
/home/sam/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in
load'
/home/sam/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in call'
/home/sam/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/client/command.rb:7:in
call'
/home/sam/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/client.rb:30:in run'
/home/sam/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/bin/spring:49:in
'
/home/sam/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/binstub.rb:31:in load'
/home/sam/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/binstub.rb:31:in
'
/home/sam/railsbridge/test_app/bin/spring:15:in require'
/home/sam/railsbridge/test_app/bin/spring:15:in
'
bin/rails:3:in load'
bin/rails:3:in
'
Bundler Error Backtrace:
from /home/sam/.rvm/rubies/ruby-2.3.7/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:80:in block (2 levels) in require'
from /home/sam/.rvm/rubies/ruby-2.3.7/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:76:in
each'
from /home/sam/.rvm/rubies/ruby-2.3.7/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:76:in block in require'
from /home/sam/.rvm/rubies/ruby-2.3.7/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:65:in
each'
from /home/sam/.rvm/rubies/ruby-2.3.7/lib/ruby/site_ruby/2.3.0/bundler/runtime.rb:65:in require'
from /home/sam/.rvm/rubies/ruby-2.3.7/lib/ruby/site_ruby/2.3.0/bundler.rb:114:in
require'
from /home/sam/railsbridge/test_app/config/application.rb:7:in <main>'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in
require'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in block in require_with_bootsnap_lfi'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in
register'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in require_with_bootsnap_lfi'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in
require'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in block in require'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in
load_dependency'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in require'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:145:in
block in perform'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in tap'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/railties-5.2.0/lib/rails/commands/server/server_command.rb:142:in
perform'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/thor-0.20.0/lib/thor/command.rb:27:in run'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/thor-0.20.0/lib/thor/invocation.rb:126:in
invoke_command'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/thor-0.20.0/lib/thor.rb:387:in dispatch'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/railties-5.2.0/lib/rails/command/base.rb:65:in
perform'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/railties-5.2.0/lib/rails/command.rb:46:in invoke'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/railties-5.2.0/lib/rails/commands.rb:18:in
'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in require'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in
block in require_with_bootsnap_lfi'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in register'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in
require_with_bootsnap_lfi'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in require'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in
block in require'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in load_dependency'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in
require'
from /home/sam/railsbridge/test_app/bin/rails:9:in <top (required)>'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in
load'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in call'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/client/command.rb:7:in
call'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/client.rb:30:in run'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/bin/spring:49:in
'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/binstub.rb:31:in load'
from /home/sam/.rvm/gems/ruby-2.3.7/gems/spring-2.0.2/lib/spring/binstub.rb:31:in
'
from /home/sam/railsbridge/test_app/bin/spring:15:in require'
from /home/sam/railsbridge/test_app/bin/spring:15:in
'
from bin/rails:3:in load'
from bin/rails:3:in
'