こんにちは。
現在、railstutorial(第4版)をやっていて、hello_appを作成したあとに、Gemfileのバージョンを指定してインストールする所なのですが、bundle installコマンドを実行すると以下のようなエラーが出ます。
コード [!] There was an error parsing `Gemfile`: You cannot specify the same gem twice with different version requirements. You specified: sqlite3 (>= 0) and sqlite3 (= 1.3.13). Bundler cannot continue. # from /home/vagrant/environment/hello_app/Gemfile:37 # ------------------------------------------- # group :development, :test do > gem 'sqlite3', '1.3.13' # gem 'byebug', '9.0.6', platform: :mri # -------------------------------------------
「sqliteの異なるバージョンを同時に指定することはできないです」という内容のメッセージだと思うのですがこの場合、gem fileの中のgem 'sqlite3'の記述を削除すればいいのですか?
現在のgem fileは以下の状態です。
コード source 'https://rubygems.org' git_source(:github) do |repo_name| repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") "https://github.com/#{repo_name}.git" end # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '5.1.6' # Use sqlite3 as the database for Active Record gem 'sqlite3' # Use Puma as the app server gem 'puma', '3.9.1' # Use SCSS for stylesheets gem 'sass-rails', '5.0.6' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '3.2.0' # See https://github.com/rails/execjs#readme for more supported runtimes # gem 'therubyracer', platforms: :ruby # Use CoffeeScript for .coffee assets and views gem 'coffee-rails', '4.2.2' # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks gem 'turbolinks', '5.0.1' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '2.6.4' # Use Redis adapter to run Action Cable in production # gem 'redis', '~> 4.0' # Use ActiveModel has_secure_password # gem 'bcrypt', '~> 3.1.7' # Use Capistrano for deployment # gem 'capistrano-rails', group: :development group :development, :test do gem 'sqlite3', '1.3.13' gem 'byebug', '9.0.6', platform: :mri end group :development do # Access an IRB console on exception pages or by using <%= console %> anywhere in the code. gem 'web-console', '3.5.1' gem 'listen', '3.1.5' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring', '2.0.2' gem 'spring-watcher-listen', '2.0.1' end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] gem 'jquery-rails', '4.3.1'
よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/07/07 03:27