‘require’:没有要加载的文件——sqlite3/sqlite3_native (LoadError)
试图让 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在这篇文章的评论中找到了解决方案 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
取消注释“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
当我尝试使用 Amazon Linux 时,我也遇到了同样的问题
由于所有内容都已在我的本地设置,我尝试调试。
问题显然是缺少库
如果转到此路径,您将看到 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
Since everything was already setup on my local, I tried debugging.
The issue apparently is the library is missing in
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.