‘require’:没有要加载的文件——sqlite3/sqlite3_native (LoadError)

发布于 2024-11-02 20:47:40 字数 331 浏览 1 评论 0原文

试图让 ruby​​ on Rails 1.8.7 在 Windows 上工作,但是当我启动 Rails 服务器时,我收到此错误:

`require': no such file to load -- sqlite3/sqlite3_native (LoadError)

我尝试复制 3 个文件并将它们放入在 ruby​​/bin 中,但正如本文底部所述,它没有帮助: http://www.ruby-forum.com/topic/216270

有什么想法吗?

Trying to get ruby on rails 1.8.7 working on windows but when i start rails server i get this error:

`require': no such file to load -- sqlite3/sqlite3_native (LoadError)

I have tried copying the 3 files and putting them in ruby/bin but it doesnt help as mentioned at the bottom of this post: http://www.ruby-forum.com/topic/216270

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

千笙结 2024-11-09 20:47:40

在这篇文章的评论中找到了解决方案 http://www.shaunambrose.com/2010/08/05/how-to-fix-a-sqlite3-dll-missing-error-message-in-ruby-on-rails/comment- page-1/#comment-15965

“问题似乎是 sqlite3 gem 是用版本 3.7.3 编译的。我下载并设置了版本 3.7.3现在效果很好。”

在这里获取:http://www.sqlite.org/sqlitedll-3_7_3.zip

Found the solution on this post's comments http://www.shaunambrose.com/2010/08/05/how-to-fix-a-sqlite3-dll-missing-error-message-in-ruby-on-rails/comment-page-1/#comment-15965

"The problem seems to be that the sqlite3 gem is compiled with version 3.7.3. I downloaded and set up version 3.7.3 instead and it now works just fine."

Get it here: http://www.sqlite.org/sqlitedll-3_7_3.zip

撑一把青伞 2024-11-09 20:47:40

取消注释“gem 'sqlite3-ruby', :require =>”行'sqlite3'”并在 Gemfile 中注释行“gem 'sqlite3'”

Uncomment the line “gem ‘sqlite3-ruby’, :require => ‘sqlite3′” and comment the line “gem ‘sqlite3′” in your Gemfile

-小熊_ 2024-11-09 20:47:40

当我尝试使用 Amazon Linux 时,我也遇到了同样的问题

“/usr/local/share/ruby/gems/2.0/gems/sqlite3-1.3.10/lib/sqlite3.rb:6:in
`require':无法加载此类文件--sqlite3/sqlite3_native
(加载错误)”

由于所有内容都已在我的本地设置,我尝试调试。

问题显然是缺少库

/usr/local/share/ruby/gems/2.0/gems/sqlite3-1.3.10/lib/sqlite3/

如果转到此路径,您将看到 sqlite3_native.so 不存在。

我所做的很简单,运行 locate sqlite3_native.so 并将其复制到该位置。

我在 Amazon Linux 中的所有其他库(包括 nokogiri 和 nodejs)中都遇到了同样的问题。

While I was trying to play around Amazon Linux, I too faced the same

"/usr/local/share/ruby/gems/2.0/gems/sqlite3-1.3.10/lib/sqlite3.rb:6:in
`require': cannot load such file -- sqlite3/sqlite3_native
(LoadError)"

Since everything was already setup on my local, I tried debugging.

The issue apparently is the library is missing in

/usr/local/share/ruby/gems/2.0/gems/sqlite3-1.3.10/lib/sqlite3/

If you go to this path, you will see that sqlite3_native.so is not present.

What I did was simply, ran a locate sqlite3_native.so and copied it to the location.

I faced the same issue with all other libraries in Amazon Linux, including nokogiri and nodejs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文