前提・実現したいこと
ここに質問の内容を詳しく書いてください。
Railsで簡単なアプリをMacのローカル環境で作成しようとしているのですが、
controllerを作成するところでエラーが出てしまいました。
発生している問題・エラーメッセージ
$rails g controller search
でsearchというコントローラーを作ろうとしたところ、
Specified 'sqlite3' for database adapter, but the gem is not loaded. Add
gem 'sqlite3'
to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). (Gem::LoadError)
というエラーが出てしまいました。
Gemfileには`gem 'sqlite3'の記述があるのに追加しろと言われているみたいで困っています。
試したこと
- splite3のバージョンを変更
この記事(https://teratail.com/questions/173521)に似た質問がありましたので、同じようにバージョンを1.3.6にしてbundle installしましたがダメでした。
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 4.2.6) was resolved to 4.2.6, which depends on
bundler (< 2.0, >= 1.3.0)Current Bundler version:
bundler (2.0.1)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by runninggem install bundler
?Could not find gem 'bundler (< 2.0, >= 1.3.0)', which is required by gem 'rails
(= 4.2.6)', in any of the sources.
というエラーが出てしまったのです。
Railsアプリを作りたいのですがコントローラー作成で詰まって心折れそうです笑
どうかよろしくお願いします!
バージョン
Rails 4.2.6
ruby 2.3.1

回答2件
あなたの回答
tips
プレビュー