前提・実現したいこと
何が原因か分からないのでタグは的外れかもしれないです。MiddlemanというGemをインストールして、Middlemanの説明書を読んで「bundle exec middleman init」や「sudo bundle exec middleman init」としても実行できません。何が原因と考えられるでしょうか。ご教授願います。
発生している問題・エラーメッセージ
vpsuser@ip-add-re-ss:~$ bundle exec middleman init bundler: failed to load command: middleman (/home/vpsuser/.rbenv/versions/2.6.3/bin/middleman) ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. /home/vpsuser/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect' /home/vpsuser/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>' /home/vpsuser/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>' /home/vpsuser/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/coffee-script-2.4.1/lib/coffee_script.rb:1:in `require' /home/vpsuser/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/coffee-script-2.4.1/lib/coffee_script.rb:1:in `<top (required)>' /home/vpsuser/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/middleman-core-4.3.4/lib/middleman-core/renderers/coffee_script.rb:2:in `require' /home/vpsuser/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/middleman-core-4.3.4/lib/middleman-core/renderers/coffee_script.rb:2:in `<top (required)>' /home/vpsuser/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/middleman-core-4.3.4/lib/middleman-core/core_extensions/rendering.rb:11:in `require' /home/vpsuser/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/middleman-core-4.3.4/lib/middleman-core/core_extensions/rendering.rb:11:in `block in <top (required)>' /home/vpsuser/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/middleman-core-4.3.4/lib/middleman-core/extensions.rb:91:in `load' /home/vpsuser/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/middleman-core-4.3.4/lib/middleman-core/extensions.rb:127:in `block in load_settings' /home/vpsuser/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/middleman-core-4.3.4/lib/middleman-core/extensions.rb:125:in `each' /home/vpsuser/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/middleman-core-4.3.4/lib/middleman-core/extensions.rb:125:in `load_settings' /home/vpsuser/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/middleman-core-4.3.4/lib/middleman-core/extension_manager.rb:12:in `initialize' /home/vpsuser/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/middleman-core-4.3.4/lib/middleman-core/application.rb:263:in `new' /home/vpsuser/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/middleman-core-4.3.4/lib/middleman-core/application.rb:263:in `initialize' /home/vpsuser/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/middleman-cli-4.3.4/bin/middleman:49:in `new' /home/vpsuser/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/middleman-cli-4.3.4/bin/middleman:49:in `<top (required)>' /home/vpsuser/.rbenv/versions/2.6.3/bin/middleman:23:in `load' /home/vpsuser/.rbenv/versions/2.6.3/bin/middleman:23:in `<top (required)>'
vpsuser@ip-add-re-ss:~$ sudo bundle exec middleman init Traceback (most recent call last): 2: from /usr/local/bin/bundle:23:in `<main>' 1: from /usr/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path' /usr/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)
該当のソースコード
vpsuser@ip-add-re-ss:~$ cat Gemfile # frozen_string_literal: true source "https://rubygems.org" git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } # gem "rails" gem 'haml', '~> 5.1', '>= 5.1.1' gem 'sinatra', '~> 2.0', '>= 2.0.5' gem 'sinatra-contrib', '~> 2.0', '>= 2.0.5' gem 'sqlite3', '~> 1.4', '>= 1.4.1' gem 'nokogiri', '~> 1.10', '>= 1.10.3' gem 'sequel', '~> 5.22' gem 'unicorn', '~> 5.5', '>= 5.5.1' gem 'open_uri_redirections', '~> 0.2.1' gem 'redcarpet', '~> 3.4' gem 'middleman', '~> 4.3', '>= 4.3.4'
$ cat Gemfile.lock GEM remote: https://rubygems.org/ specs: activesupport (5.0.7.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) addressable (2.6.0) public_suffix (>= 2.0.2, < 4.0) backports (3.15.0) coffee-script (2.4.1) coffee-script-source execjs coffee-script-source (1.12.2) concurrent-ruby (1.1.5) contracts (0.13.0) dotenv (2.7.4) erubis (2.7.0) execjs (2.7.0) fast_blank (1.0.0) fastimage (2.1.5) ffi (1.11.1) haml (5.1.1) temple (>= 0.8.0) tilt hamster (3.0.0) concurrent-ruby (~> 1.0) hashie (3.6.0) i18n (0.9.5) concurrent-ruby (~> 1.0) kgio (2.11.2) kramdown (1.17.0) listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) memoist (0.16.0) middleman (4.3.4) coffee-script (~> 2.2) haml (>= 4.0.5) kramdown (~> 1.2) middleman-cli (= 4.3.4) middleman-core (= 4.3.4) middleman-cli (4.3.4) thor (>= 0.17.0, < 2.0) middleman-core (4.3.4) activesupport (>= 4.2, < 5.1) addressable (~> 2.3) backports (~> 3.6) bundler contracts (~> 0.13.0) dotenv erubis execjs (~> 2.0) fast_blank fastimage (~> 2.0) hamster (~> 3.0) hashie (~> 3.4) i18n (~> 0.9.0) listen (~> 3.0.0) memoist (~> 0.14) padrino-helpers (~> 0.13.0) parallel rack (>= 1.4.5, < 3) sassc (~> 2.0) servolux tilt (~> 2.0.9) uglifier (~> 3.0) mini_portile2 (2.4.0) minitest (5.11.3) multi_json (1.13.1) mustermann (1.0.3) nokogiri (1.10.3) mini_portile2 (~> 2.4.0) open_uri_redirections (0.2.1) padrino-helpers (0.13.3.4) i18n (~> 0.6, >= 0.6.7) padrino-support (= 0.13.3.4) tilt (>= 1.4.1, < 3) padrino-support (0.13.3.4) activesupport (>= 3.1) parallel (1.17.0) public_suffix (3.1.1) rack (2.0.7) rack-protection (2.0.5) rack raindrops (0.19.0) rake (12.3.3) rb-fsevent (0.10.3) rb-inotify (0.10.0) ffi (~> 1.0) redcarpet (3.5.0) sassc (2.0.1) ffi (~> 1.9) rake sequel (5.22.0) servolux (0.13.0) sinatra (2.0.5) mustermann (~> 1.0) rack (~> 2.0) rack-protection (= 2.0.5) tilt (~> 2.0) sinatra-contrib (2.0.5) backports (>= 2.8.2) multi_json mustermann (~> 1.0) rack-protection (= 2.0.5) sinatra (= 2.0.5) tilt (>= 1.3, < 3) sqlite3 (1.4.1) temple (0.8.1) thor (0.20.3) thread_safe (0.3.6) tilt (2.0.9) tzinfo (1.2.5) thread_safe (~> 0.1) uglifier (3.2.0) execjs (>= 0.3.0, < 3) unicorn (5.5.1) kgio (~> 2.6) raindrops (~> 0.7) PLATFORMS ruby DEPENDENCIES haml (~> 5.1, >= 5.1.1) middleman (~> 4.3, >= 4.3.4) nokogiri (~> 1.10, >= 1.10.3) open_uri_redirections (~> 0.2.1) redcarpet (~> 3.4) sequel (~> 5.22) sinatra (~> 2.0, >= 2.0.5) sinatra-contrib (~> 2.0, >= 2.0.5) sqlite3 (~> 1.4, >= 1.4.1) unicorn (~> 5.5, >= 5.5.1) BUNDLED WITH 1.17.2
補足情報(FW/ツールのバージョンなど)
$ bundle -v Bundler version 1.17.2 $ rbenv -v rbenv 1.1.2-2-g4e92322 $ rbenv versions system * 2.6.3 (set by /home/vpsuser/.rbenv/version)
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/08/01 05:10