Brand new rails app, can't generate scaffold

前端 未结 2 1560
轻奢々
轻奢々 2021-01-19 01:14

Although I\'m not an expert, I\'ve developed a few rails apps in-house to use for some relatively small/medium sized projects and haven\'t had any issues as similar to this

相关标签:
2条回答
  • 2021-01-19 01:43

    The error states that it can't find a version of sqlite3 ~> 1.3.6 so that is what your Gemfile should require:

    gem 'sqlite3', '~> 1.3.6'
    

    The more lenient definition of gem 'sqlite3', '~> 1.3', '>= 1.3.6' which will also allow 1.4 is only valid for the master branch of rails.

    Edit

    The 5-2-stable branch actually now also allows using sqlite 1.4 but the currently released 5.2.2 gem does not.

    Update 2019-03-18

    Now that rails 5.2.2.1 has been released, the correct and also easiest fix is to bump rails to that version, as it will restrict sqlite3 to 1.3.6:

    # In Gemfile
    gem 'rails', '~> 5.2.2.1'
    

    Given the security fixes in that version, this should be done anyway.

    0 讨论(0)
  • 2021-01-19 01:53

    I think the problem is you have already installed sqlite 1.4 installed in your system. Could you please try removing it first and then try bundle install.

    If that doesn't work try following commands:

    bundle clean --force
    bundle install
    
    0 讨论(0)
提交回复
热议问题