https://qiita.com/saitoeku3/items/370001477df05182bae2
この記事に従ってrailsの環境構築をしていたのですが
bundle exec rails new test_app
このコマンドでエラーが発生してしまって困っています。
エラーは以下の内容です。
発生している問題・エラーメッセージ
extconf failed, exit code 1
Gem files will remain installed in
/home/linuxbrew/.linuxbrew/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.2 for
inspection.
Results logged to
/home/linuxbrew/.linuxbrew/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/sqlite3-1.4.2/gem_make.out
An error occurred while installing sqlite3 (1.4.2), and Bundler cannot
continue.
Make sure that gem install sqlite3 -v '1.4.2' --source 'https://rubygems.org/'
succeeds before bundling.
In Gemfile:
sqlite3
run bundle binstubs bundler
Could not find gem 'sqlite3 (> 1.4)' in any of the gem sources listed in your Gemfile.> 1.4)' in any of the gem sources listed in your Gemfile.
run bundle exec spring binstub --all
Could not find gem 'sqlite3 (
Run bundle install
to install missing gems.
rails webpacker:install
Traceback (most recent call last):
3: from bin/rails:3:in <main>' 2: from bin/rails:3:in
require_relative'
試したこと
gem install sqlite3 -v '1.4.2' --source
'https://rubygems.org/'
を試してみたのですが
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
current directory: /home/linuxbrew/.linuxbrew/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.2/ext/sqlite3
/home/linuxbrew/.linuxbrew/opt/ruby/bin/ruby -I /home/linuxbrew/.linuxbrew/Cellar/ruby/2.6.5/lib/ruby/2.6.0 -r ./siteconf20200110-24366-o4qv0i.rb extconf.rb
/home/linuxbrew/.linuxbrew/Cellar/ruby/2.6.5/lib/ruby/2.6.0/mkmf.rb:1565: warning: Insecure world writable dir /home/ryoga17226/.rbenv/shims in PATH, mode 040777
checking for sqlite3.h... no
sqlite3.h is missing. Try 'brew install sqlite3',
'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
and check your shared library search path (the
location where your sqlite3 shared library is located).
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/linuxbrew/.linuxbrew/Cellar/ruby/2.6.5/bin/$(RUBY_BASE_NAME)
--with-sqlcipher
--without-sqlcipher
--with-sqlite3-config
--without-sqlite3-config
--with-pkg-config
--without-pkg-config
--with-sqlcipher
--without-sqlcipher
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/linuxbrew/.linuxbrew/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/sqlite3-1.4.2/mkmf.log
extconf failed, exit code 1
とも表示されてしまいました。
補足情報(FW/ツールのバージョンなど)
rails 2.7.0
rbenv 1.1.2
gem 3.0.6
bundler 2.1.4
rubyの勉強を一通り終えた程度のド素人なのですが、ご教授お願い致します。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/01/10 13:11
2020/01/10 13:48
2020/01/11 06:27
2020/01/11 06:53
2020/01/11 07:13