Ruby on Rails - “Add 'gem sqlite3'' to your Gemfile”

前端 未结 11 1171
你的背包
你的背包 2020-12-05 13:51

I\'m a complete n00b on Rails with only beginner knowledge of Ruby. I plan on studying Ruby more before I really learn Rails, but I\'m waayy too curious for my own good.

11条回答
  •  时光取名叫无心
    2020-12-05 14:27

    In my case, this error "Specified 'sqlite3' for database adapter, but the gem is not loaded. Add gem 'sqlite3' to your Gemfile." message showed up, when I ran rails server right after I generated a fresh rails app. It was with Rails version 4.1.16 (Ruby version 2.3.1)

    gem 'sqlite3', '~> 1.3.0'
    

    This line in Gemfile removed the error message. I think new sqlite gem (version 1.4) has a conflict with old rails (version 4.1) but I didn't see any related issue on their Github repository. I'm adding this answer here because it might help anybody experiencing the same situation I'm in.

提交回复
热议问题