いつもお世話になっています。
railsでブログを作るときに発生したエラーに関しての質問です。
まだrailsを触って1か月未満の初心者ですが、
https://qiita.com/schroneko/items/0208a4f16fc1e4b6f152
の記事を参考にして、Rail5でブログを作ろうとしました。
記事の通りにGemfileに
gem 'execjs'
gem 'therubyracer'
と記述をして、bundle installを実行したところ、以下のようなエラー文が出ました。
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/ui/shell.rb:125:in []': invalid byte sequence in UTF-8 (ArgumentError) from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/ui/shell.rb:125:in
strip_leading_spaces'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/ui/shell.rb:130:in word_wrap' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/ui/shell.rb:103:in
tell_me'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/ui/shell.rb:45:in error' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/friendly_errors.rb:22:in
log_error'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/friendly_errors.rb:126:in rescue in with_friendly_errors' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/friendly_errors.rb:122:in
with_friendly_errors'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0/exe/bundle:22:in <top (required)>' from C:/Ruby23-x64/bin/bundle:22:in
load'
from C:/Ruby23-x64/bin/bundle:22:in `<main>'
エラー文に「 UTF-8」の書いてあるから文字コードをいじれば良いのかな、と思ったものの、具体的にどのようにして解決すれば良いのか、調べても全く分からないので、質問させて頂きました。
ちなみに、環境は
Ruby 2.3.3
Rail 5.1.4
Windows10 64bit
エディタ:Subline Text
です。
よろしくお願い致します。
追記:
エラーが出ている
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bundler-1.16.0/lib/bundler/ui/shell.rb
のファイルを UTF-8 形式で保存しましたが、変化は見られませんでした。
また、cmdに'chcp 65001'と入力した後に、bundle installを実行したところ、以下のようなエラー文が表示されました。
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/ext/libv8
C:/Ruby23-x64/bin/ruby.exe -r ./siteconf20171122-12692-19es34g.rb extconf.rb
creating Makefile
which: no python in
(.;C:\Ruby23-x64\devkit\bin;C:\Ruby23-x64\devkit\mingw\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program
Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program
Files\Java\jdk-9.0.1\bin;C:\tools;C:\Program
Files\nodejs;C:\Ruby23-x64\bin;;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;C:\Ruby22-x64\bin;C:\Ruby23-x64\bin;C:\Ruby24-x64\bin;C:\Program
Files\Ruby24-x64\bin;C:\Users\touma\AppData\Local\Microsoft\WindowsApps;C:\Users\touma\AppData\Roaming\npm)
The system cannot find the path specified.
which: no python in
(.;C:\Ruby23-x64\devkit\bin;C:\Ruby23-x64\devkit\mingw\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program
Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program
Files\Java\jdk-9.0.1\bin;C:\tools;C:\Program
Files\nodejs;C:\Ruby23-x64\bin;;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;C:\Ruby22-x64\bin;C:\Ruby23-x64\bin;C:\Ruby24-x64\bin;C:\Program
Files\Ruby24-x64\bin;C:\Users\touma\AppData\Local\Microsoft\WindowsApps;C:\Users\touma\AppData\Roaming\npm)
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/ext/libv8/builder.rb:86:in
setup_python!': libv8 requires python 2 to be installed in order to build, but it is currently not available (RuntimeError) from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/ext/libv8/builder.rb:53:in
build_libv8!'
from
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/ext/libv8/location.rb:24:in
install!' from extconf.rb:7:in
<main>'
extconf failed, exit code 1
Gem files will remain installed in
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19 for inspection.
Results logged to
C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/libv8-3.16.14.19/gem_make.out
An error occurred while installing libv8 (3.16.14.19), and Bundler cannot
continue.
Make sure that gem install libv8 -v '3.16.14.19'
succeeds before bundling.
In Gemfile:
therubyracer was resolved to 0.12.3, which depends on
libv8
回答1件
あなたの回答
tips
プレビュー