【发布时间】:2019-04-07 19:24:16
【问题描述】:
我已经升级到 ruby 2.5.0,但我到处都有冲突。我检查了以前有关堆栈溢出的帖子,例如:
Ruby on Rails - "Add 'gem sqlite3'' to your Gemfile"
cannot load such file — sqlite3/sqlite3_native
cannot load such file -- sqlite3/sqlite3_native (LoadError) on ruby on rails
https://github.com/sparklemotion/sqlite3-ruby/issues/137
但没有一个对我有用。我的问题与这些帖子类似,因为在我运行 rails server 后出现长长的错误消息后,最后几行显示为:
1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in 'block in require'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in 'require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
我尝试创建一个新项目,通过 gem 和 minigw 本身重新安装 sqlite3,重新安装 rails 和 ruby。我已经尝试了前面问题中的大部分说明,但没有任何效果。 SQLite3 版本 3.25.2、Ruby 2.5.3、rails 5.2.1
抱歉,这可能是一个简单的修复,但我是一个完全的 ruby 初学者,并且我已经尝试了几个小时不同的东西。任何帮助表示赞赏。
【问题讨论】:
标签: ruby-on-rails ruby sqlite sqlite3-ruby