I
I
Intelide2016-09-24 17:53:03
Ruby on Rails
Intelide, 2016-09-24 17:53:03

How to start ruby ​​webserver?

Hello, I decided to try rubyonrails
using this rusrails.ru/getting-started-with-rails instructions for centos 6

rails --version
Rails 5.0.0.1
ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]

I run the
bin/rails server command and I
get the following errors
bin/rails server
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/runtime.rb:94: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:
/usr/local/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect'
/usr/local/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
/usr/local/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>'
/usr/local/lib/ruby/gems/2.3.0/gems/uglifier-3.0.2/lib/uglifier.rb:5:in `require'
/usr/local/lib/ruby/gems/2.3.0/gems/uglifier-3.0.2/lib/uglifier.rb:5:in `<top (required)>'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/runtime.rb:91:in `require'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/runtime.rb:86:in `each'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/runtime.rb:86:in `block in require'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/runtime.rb:75:in `each'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/runtime.rb:75:in `require'
/usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.1/lib/bundler.rb:106:in `require'
/home/vladimir/web/blog/config/application.rb:7:in `<top (required)>'
/usr/local/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:88:in `require'
/usr/local/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:88:in `block in server'
/usr/local/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `tap'
/usr/local/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `server'
/usr/local/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
/usr/local/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
/home/vladimir/web/blog/bin/rails:9:in `require'
/home/vladimir/web/blog/bin/rails:9:in `<top (required)>'
/usr/local/lib/ruby/gems/2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `load'
/usr/local/lib/ruby/gems/2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `call'
/usr/local/lib/ruby/gems/2.3.0/gems/spring-1.7.2/lib/spring/client/command.rb:7:in `call'
/usr/local/lib/ruby/gems/2.3.0/gems/spring-1.7.2/lib/spring/client.rb:30:in `run'
/usr/local/lib/ruby/gems/2.3.0/gems/spring-1.7.2/bin/spring:49:in `<top (required)>'
/usr/local/lib/ruby/gems/2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `load'
/usr/local/lib/ruby/gems/2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `<top (required)>'
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/home/vladimir/web/blog/bin/spring:13:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Bundler Error Backtrace:
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/runtime.rb:90:in `block (2 levels) in require'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/runtime.rb:86:in `each'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/runtime.rb:86:in `block in require'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/runtime.rb:75:in `each'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.1/lib/bundler/runtime.rb:75:in `require'
        from /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.13.1/lib/bundler.rb:106:in `require'
        from /home/vladimir/web/blog/config/application.rb:7:in `<top (required)>'
        from /usr/local/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:88:in `require'
        from /usr/local/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:88:in `block in server'
        from /usr/local/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `tap'
        from /usr/local/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:85:in `server'
        from /usr/local/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
        from /usr/local/lib/ruby/gems/2.3.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
        from /home/vladimir/web/blog/bin/rails:9:in `require'
        from /home/vladimir/web/blog/bin/rails:9:in `<top (required)>'
        from /usr/local/lib/ruby/gems/2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `load'
        from /usr/local/lib/ruby/gems/2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `call'
        from /usr/local/lib/ruby/gems/2.3.0/gems/spring-1.7.2/lib/spring/client/command.rb:7:in `call'
        from /usr/local/lib/ruby/gems/2.3.0/gems/spring-1.7.2/lib/spring/client.rb:30:in `run'
        from /usr/local/lib/ruby/gems/2.3.0/gems/spring-1.7.2/bin/spring:49:in `<top (required)>'
        from /usr/local/lib/ruby/gems/2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `load'
        from /usr/local/lib/ruby/gems/2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `<top (required)>'
        from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /home/vladimir/web/blog/bin/spring:13:in `<top (required)>'
        from bin/rails:3:in `load'
        from bin/rails:3:in `<main>'

already installed gem install execjs
Please tell me what else is missing and how to install it.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Grudinkin, 2016-09-24
@Intelide

Need to install nodejs https://nodejs.org/en/download/package-manager/#en...

R
Roman Mirilaczvili, 2016-09-24
@2ord

From rusrails.ru/getting-started-with-rails
execjs is just a wrapper for external JavaScript interpreters. Also install the Node.js package or the libv8 library for the therubyracer extra gem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question