Sqlite3 gem for Rails 3.1

前端 未结 3 1815
挽巷
挽巷 2021-01-13 23:45

I wanna create myApp using command

rails new myApp

but it gives an error:

Installing sqlite3 (1.3.4) wit

3条回答
  •  孤街浪徒
    2021-01-14 00:34

    I had the same issue but in Windows. I found only two solutions for now 1* After the project creation fail, enter in its folder and modify the Gemfile. Change the line
    gem 'sqlite3', '1.3.11' by one of these bellow:

    gem 'sqlite3', git: "https://github.com/sparklemotion/sqlite3-ruby"
    
    gem 'sqlite3', git: "https://github.com/sparklemotion/sqlite3-ruby", branch: "add-gemspec"
    
    gem 'sqlite3', git: "https://github.com/larskanis/sqlite3-ruby", branch: "add-gemspec"
    

    And run again the bundle install command for this project

    The second solution I found was downloading the gem from https://rubygems.org/ and saving it locally to install from file, first, you've to install mingw (but only for Windows)

    C:\Sites>ridk exec pacman -S mingw-w64-x86_64-dlfcn
    C:\Sites>gem install --local C:\sqlite3-1.4.0.gem
    

    I've tried some others solutions but these two were the only ones worked for me.

    https://mycodeissuesandfixes.blogspot.com/2019/02/ruby-on-rails-issue-about-sqlite-3-gem.html Those are others fixes but I don't know if they're going to help you in Linux. Hope it helps!! I've been trying for 5 days completes until I found something that works with this error of sqlite 3 gem

提交回复
热议问题