美文网首页
肖威洞察 | can't activate sqlite

肖威洞察 | can't activate sqlite

作者: 2039c142a8d1 | 来源:发表于2019-03-04 11:07 被阅读2次

https://github.com/rails/rails/issues/35387


目前的解决方法是编辑Gemfile以提供版本范围sqlite3

这些都可以工作:

  • gem 'sqlite3', '< 1.4'
  • gem 'sqlite3', '~> 1.3.6'

[编辑:我看到这是固定在主人(#35154),但5.2.2版本仍然受到影响“在野外”。我认为,刚开始使用Rails的用户会对此感到非常困惑。

 ✘ xiaowei@192 ⮀ ~/newspace/api_exercise ⮀ ⭠ master± ⮀ rails g controller welcome
/Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/bundler-1.16.0/lib/bundler/rubygems_integration.rb:404:in `block (2 levels) in replace_gem': Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on? can't activate sqlite3 (~> 1.3.6), already activated sqlite3-1.4.0. Make sure all dependencies are added to Gemfile. (LoadError)
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:12:in `<main>'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:83:in `register'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/connection_specification.rb:191:in `spec'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:952:in `establish_connection'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activerecord-5.2.2/lib/active_record/connection_handling.rb:60:in `establish_connection'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activerecord-5.2.2/lib/active_record/railtie.rb:136:in `block (2 levels) in <class:Railtie>'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:71:in `instance_eval'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:51:in `each'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activerecord-5.2.2/lib/active_record/base.rb:328:in `<module:ActiveRecord>'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activerecord-5.2.2/lib/active_record/base.rb:27:in `<main>'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:83:in `register'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/application.rb:356:in `active_record_configured?'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/application.rb:273:in `disconnect_database'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/application.rb:107:in `preload'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/application.rb:153:in `serve'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/application.rb:141:in `block in run'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/application.rb:135:in `loop'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/application.rb:135:in `run'
    from /Users/xiaowei/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in `<top (required)>'
    from /Users/xiaowei/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/xiaowei/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from -e:1:in `<main>'
 ✘ xiaowei@192 ⮀ ~/newspace/api_exercise ⮀ ⭠ master± ⮀ bundle install
Using rake 12.3.2
Using concurrent-ruby 1.1.4
Using i18n 1.5.3
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 5.2.2
Using builder 3.2.3
Using erubi 1.8.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.1
Using rails-dom-testing 2.0.3
Using crass 1.0.4
Using loofah 2.2.3
Using rails-html-sanitizer 1.0.4
Using actionview 5.2.2
Using rack 2.0.6
Using rack-test 1.1.0
Using actionpack 5.2.2
Using nio4r 2.3.1
Using websocket-extensions 0.1.3
Using websocket-driver 0.7.0
Using actioncable 5.2.2
Using globalid 0.4.2
Using activejob 5.2.2
Using mini_mime 1.0.1
Using mail 2.7.1
Using actionmailer 5.2.2
Using activemodel 5.2.2
Using arel 9.0.0
Using activerecord 5.2.2
Using mimemagic 0.3.3
Using marcel 0.3.3
Using activestorage 5.2.2
Using public_suffix 3.0.3
Using addressable 2.6.0
Using io-like 0.3.0
Using archive-zip 0.12.0
Using execjs 2.7.0
Using autoprefixer-rails 9.2.1
Using bindex 0.5.0
Using msgpack 1.2.7
Using bootsnap 1.4.1
Using rb-fsevent 0.10.3
Using ffi 1.10.0
Using rb-inotify 0.10.0
Using sass-listen 4.0.0
Using sass 3.7.3
Using bootstrap-sass 3.3.7
Using bundler 1.16.0
Using byebug 11.0.0
Using regexp_parser 1.3.0
Using xpath 3.2.0
Using capybara 3.14.0
Using childprocess 0.9.0
Using chromedriver-helper 2.1.0
Using coffee-script-source 1.12.2
Using coffee-script 2.4.1
Using method_source 0.9.2
Using thor 0.20.3
Using railties 5.2.2
Using coffee-rails 4.2.2
Using unf_ext 0.0.7.5
Using unf 0.1.4
Using domain_name 0.5.20180417
Using http-cookie 1.0.3
Using multi_json 1.13.1
Using jbuilder 2.8.0
Using ruby_dep 1.5.0
Using listen 3.1.5
Using mime-types-data 3.2018.0812
Using mime-types 3.2.2
Using netrc 0.11.0
Using puma 3.12.0
Using sprockets 3.7.2
Using sprockets-rails 3.2.1
Using rails 5.2.2
Using rest-client 2.0.2
Using rubyzip 1.2.2
Using tilt 2.0.9
Using sass-rails 5.0.7
Using selenium-webdriver 3.141.0
Using spring 2.0.2
Using spring-watcher-listen 2.0.1
Using sqlite3 1.3.13
Using turbolinks-source 5.2.0
Using turbolinks 5.2.0
Using uglifier 4.1.20
Using web-console 3.7.0
Bundle complete! 20 Gemfile dependencies, 89 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
 xiaowei@192 ⮀ ~/newspace/api_exercise ⮀ ⭠ master± ⮀ rails g controller welcome
Running via Spring preloader in process 62520
      create  app/controllers/welcome_controller.rb
      invoke  erb
      create    app/views/welcome
      invoke  test_unit
      create    test/controllers/welcome_controller_test.rb
      invoke  helper
      create    app/helpers/welcome_helper.rb
      invoke    test_unit
      invoke  assets
      invoke    coffee
      create      app/assets/javascripts/welcome.coffee
      invoke    scss
      create      app/assets/stylesheets/welcome.scss
 xiaowei@192 ⮀ ~/newspace/api_exercise ⮀ ⭠ master± ⮀

相关文章

网友评论

      本文标题:肖威洞察 | can't activate sqlite

      本文链接:https://www.haomeiwen.com/subject/qtpbuqtx.html