我已经查看了其他几个帖子并尝试了解决方案但没有成功.
问题被标记为此解决方案的副本 无法在ruby上加载此类文件 - sqlite3/sqlite3_native(LoadError) 但是给出的答案对我不起作用.我只是得到了同样的错误
我刚安装了rails,所以一切都是最新的我使用以下内容:Windows 10,ruby版本2.5.1,rails版本5.2.0
我也尝试用bundle update更新SQLite gem.
这是错误:
C:\proje>rails s
Traceback (most recent call last):
43: from bin/rails:4:in `<main>'
42: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `require'
41: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in `load_dependency'
40: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `block in require'
39: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
38: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
37: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
36: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
35: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
34: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/commands.rb:18:in `<top (required)>'
33: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/command.rb:46:in `invoke'
32: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/railties-5.2.0/lib/rails/command/base.rb:65:in `perform'
31: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
30: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command' …Run Code Online (Sandbox Code Playgroud) 我之前问过有关 cloud9 的类似问题,但我现在尝试在我的 Windows 10 计算机上并行执行相同的项目,因为我无法访问互联网来使用 cloud9。我正在尝试设置配置,为遵循 Daniel Kehoe 的 learn-rails 教程书做准备,但我在设置环境变量时遇到问题。这本书似乎解释了如何在 Mac 上执行此操作,但我在 Atom 编辑器中找不到该文件。书上说输入命令:
atom ~/.bash_profile
Run Code Online (Sandbox Code Playgroud)
然而,这只是创建了一个新文件,该文件不属于我的 Rails 应用程序项目目录。我也尝试过
atom ~/.bashrc
Run Code Online (Sandbox Code Playgroud)
这是替代方案,但结果相同。它只是创建一个与我的项目无关的文件。该文件应该已经存在于某处。
我应该将环境变量放入名为“.bashrc”的文件中,但我不知道在哪里可以找到该文件,因为它是隐藏的。如何使用 Atom 文本编辑器找到并打开该文件?