Tasks: TOP => environment СРОЧНО!


(Anton Kopko) #1

Здравствуйте)
Пишу на счёт публикации habrahabr.ru/post/258111
Прошу помощи, пожалуйста

Взял эту задумку за основу.
С приложением — разобрался, а вот с сервером… Возникли трудности, мягко говоря…
Я не знаком с ruby on rails

В общем

Выполняю две команды
bundle inslall и QUEUE=* rake environment resque:work
На второй что-то идёт не так, разобраться не могу
Спасайте, пожалуйста
23.05 уже защита, помогите получить диплом, буду очень благодарен

[email protected]:~/Документы/server-test$ bundle installUsing rake 12.0.0
Using encryptor 3.0.0
Using builder 3.2.3
Using jmespath 1.3.1
Using multi_json 1.12.1
Using multi_xml 0.6.0
Using json 1.8.6
Using mono_logger 1.1.0
Using redis 3.3.3
Using rack 1.5.5
Using tilt 1.4.1
Using rmagick 2.15.0
Using pg 0.20.0
Using i18n 0.8.1
Using minitest 5.10.2
Using thread_safe 0.3.6
Using erubis 2.7.0
Using mime-types 1.25.1
Using polyglot 0.3.5
Using arel 5.0.1.20140414130214
Using thor 0.19.4
Using hike 1.2.3
Using bundler 1.15.0
Using sass 3.2.19
Using execjs 2.7.0
Using coffee-script-source 1.12.2
Using turbolinks-source 5.0.3
Using rdoc 4.3.0
Using spring 1.7.2
Using attr_encrypted 3.0.3
Using aws-sdk-core 2.0.29
Using dropbox-sdk 1.6.5
Using redis-namespace 1.5.3
Using rack-protection 1.5.3
Using vegas 0.1.11
Using rack-test 0.6.3
Using tzinfo 1.2.3
Using treetop 1.4.15
Using sprockets 2.12.4
Using uglifier 3.2.0
Using coffee-script 2.4.1
Using turbolinks 5.0.1
Using sdoc 0.4.2
Using aws-sdk-resources 2.0.29
Using sinatra 1.4.8
Using activesupport 4.1.1
Using mail 2.5.4
Using aws-sdk 2.0.29
Using resque 1.27.4
Using actionview 4.1.1
Using activemodel 4.1.1
Using jbuilder 2.6.4
Using actionpack 4.1.1
Using activerecord 4.1.1
Using actionmailer 4.1.1
Using railties 4.1.1
Using sprockets-rails 2.3.3
Using coffee-rails 4.0.1
Using jquery-rails 3.1.4
Using rails 4.1.1
Using sass-rails 4.0.5
Bundle complete! 15 Gemfile dependencies, 61 gems now installed.
Use bundle info [gemname] to see where a bundled gem is installed.
[email protected]:~/Документы/server-test$ QUEUE=* rake environment resque:work
/home/ton/.rvm/gems/ruby-2.4.0/gems/activesupport-4.1.1/lib/active_support/values/time_zone.rb:285: warning: circular argument reference — now
rake 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 github.com/rails/execjs for a list of available runtimes.
Backtrace for gem load error is:
/home/ton/.rvm/gems/ruby-2.4.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in autodetect' /home/ton/.rvm/gems/ruby-2.4.0/gems/execjs-2.7.0/lib/execjs.rb:5:inmodule:ExecJS
/home/ton/.rvm/gems/ruby-2.4.0/gems/execjs-2.7.0/lib/execjs.rb:4:in <top (required)>' /home/ton/.rvm/gems/ruby-2.4.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:inrequire’
/home/ton/.rvm/gems/ruby-2.4.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in block in require' /home/ton/.rvm/gems/ruby-2.4.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:inload_dependency’
/home/ton/.rvm/gems/ruby-2.4.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in require' /home/ton/.rvm/gems/ruby-2.4.0/gems/uglifier-3.2.0/lib/uglifier.rb:5:in<top (required)>’
/home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:82:in require' /home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:82:inblock (2 levels) in require’
/home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:77:in each' /home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:77:inblock in require’
/home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:66:in each' /home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:66:inrequire’
/home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler.rb:108:in require' /home/ton/Документы/server-test/config/application.rb:7:in<top (required)>’
/home/ton/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require' /home/ton/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:inrequire’
/home/ton/Документы/server-test/Rakefile:6:in <top (required)>' /home/ton/.rvm/gems/[email protected]/gems/rake-12.0.0/lib/rake/rake_module.rb:28:inload’
/home/ton/.rvm/gems/[email protected]/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in load_rakefile' /home/ton/.rvm/gems/[email protected]/gems/rake-12.0.0/lib/rake/application.rb:687:inraw_load_rakefile’
/home/ton/.rvm/gems/[email protected]/gems/rake-12.0.0/lib/rake/application.rb:96:in block in load_rakefile' /home/ton/.rvm/gems/[email protected]/gems/rake-12.0.0/lib/rake/application.rb:178:instandard_exception_handling’
/home/ton/.rvm/gems/[email protected]/gems/rake-12.0.0/lib/rake/application.rb:95:in load_rakefile' /home/ton/.rvm/gems/[email protected]/gems/rake-12.0.0/lib/rake/application.rb:79:inblock in run’
/home/ton/.rvm/gems/[email protected]/gems/rake-12.0.0/lib/rake/application.rb:178:in standard_exception_handling' /home/ton/.rvm/gems/[email protected]/gems/rake-12.0.0/lib/rake/application.rb:77:inrun’
/home/ton/.rvm/gems/[email protected]/gems/rake-12.0.0/exe/rake:27:in <top (required)>' /home/ton/.rvm/rubies/ruby-2.4.0/bin/rake:22:inload’
/home/ton/.rvm/rubies/ruby-2.4.0/bin/rake:22:in ' Bundler Error Backtrace: /home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:85:inrescue in block (2 levels) in require’
/home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:81:in block (2 levels) in require' /home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:77:ineach’
/home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:77:in block in require' /home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:66:ineach’
/home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:66:in require' /home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler.rb:108:inrequire’
/home/ton/Документы/server-test/config/application.rb:7:in <top (required)>' /home/ton/Документы/server-test/Rakefile:6:in<top (required)>’
/home/ton/.rvm/gems/[email protected]/gems/rake-12.0.0/exe/rake:27:in <top (required)>' ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See github.com/rails/execjs for a list of available runtimes. /home/ton/.rvm/gems/ruby-2.4.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:inautodetect’
/home/ton/.rvm/gems/ruby-2.4.0/gems/execjs-2.7.0/lib/execjs.rb:5:in <module:ExecJS>' /home/ton/.rvm/gems/ruby-2.4.0/gems/execjs-2.7.0/lib/execjs.rb:4:in<top (required)>’
/home/ton/.rvm/gems/ruby-2.4.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in require' /home/ton/.rvm/gems/ruby-2.4.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:inblock in require’
/home/ton/.rvm/gems/ruby-2.4.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in load_dependency' /home/ton/.rvm/gems/ruby-2.4.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:inrequire’
/home/ton/.rvm/gems/ruby-2.4.0/gems/uglifier-3.2.0/lib/uglifier.rb:5:in <top (required)>' /home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:82:inrequire’
/home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:82:in block (2 levels) in require' /home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:77:ineach’
/home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:77:in block in require' /home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:66:ineach’
/home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler/runtime.rb:66:in require' /home/ton/.rvm/gems/ruby-2.4.0/gems/bundler-1.15.0/lib/bundler.rb:108:inrequire’
/home/ton/Документы/server-test/config/application.rb:7:in <top (required)>' /home/ton/Документы/server-test/Rakefile:6:in<top (required)>’
/home/ton/.rvm/gems/[email protected]/gems/rake-12.0.0/exe/rake:27:in `<top (required)>’
(See full trace by running task with --trace)


#2

Rails не может найти гем для интерпретации JavaScript-кода. Здесь приведён список таких гемов: https://github.com/sstephenson/execjs

Я бы посоветовал использовать therubyracer или, того лучше, NodeJS:
$ sudo apt-get install nodejs

Это должно решить вашу проблему.