rails new を実施したところエラーが出てうまくいかないです
やりたいこと エラーを解消しrails newをだたしく起動させたい
[vagrant@localhost rails_lessons]$ rails new my_memo create create README.md create Rakefile : : create tmp/storage create tmp/storage/.keep remove config/initializers/cors.rb remove config/initializers/new_framework_defaults_6_0.rb run bundle install The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. Fetching gem metadata from https://rubygems.org/............ Fetching gem metadata from https://rubygems.org/. Resolving dependencies...... Using rake 13.0.1 Using concurrent-ruby 1.1.5 : : Using sassc-rails 2.1.2 Using sass-rails 6.0.0 Using selenium-webdriver 3.142.6 Using spring 2.1.0 Using spring-watcher-listen 2.0.1 Fetching sqlite3 1.4.1 Installing sqlite3 1.4.1 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.1/ext/sqlite3 /home/vagrant/.rbenv/versions/2.6.5/bin/ruby -I /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/2.6.0 -r ./siteconf20191213-24129-14tuj2s.rb extconf.rb 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 --without-opt-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/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/sqlite3-1.4.1/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.1 for inspection. Results logged to /home/vagrant/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0/sqlite3-1.4.1/gem_make.out An error occurred while installing sqlite3 (1.4.1), and Bundler cannot continue. Make sure that `gem install sqlite3 -v '1.4.1' --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. run bundle exec spring binstub --all Could not find gem 'sqlite3 (~> 1.4)' in any of the gem sources listed in your Gemfile. Run `bundle install` to install missing gems. rails webpacker:install Could not find gem 'sqlite3 (~> 1.4)' in any of the gem sources listed in your Gemfile. Run `bundle install` to install missing gems.
恐らく重要なのは
①
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
②
Fetching sqlite3 1.4.1 Installing sqlite3 1.4.1 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
③
An error occurred while installing sqlite3 (1.4.1), and Bundler cannot continue. Make sure that `gem install sqlite3 -v '1.4.1' --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. run bundle exec spring binstub --all Could not find gem 'sqlite3 (~> 1.4)' in any of the gem sources listed in your Gemfile. Run `bundle install` to install missing gems. rails webpacker:install Could not find gem 'sqlite3 (~> 1.4)' in any of the gem sources listed in your Gemfile. Run `bundle install` to install missing gems.
の3か所の記述のところだと思われるのですが
①に関しては全く原因と対処法が思い浮かびません
②③にかんしてはaqliteのバージョンが違うという事だと思うのですが、gem fileを書き換えて
gem 'sqlite3', '~> 1.4'
を
gem 'sqlite3', '~> 1.4.1'
に書き換えて試すことも試みましたがうまくいきませんでした
原因や解決法を教えていただければと思います
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/12/13 09:31
2019/12/13 10:28
2019/12/13 10:31