Windows/Ruby/Rails install --- .cannot load such file -- sqlite3/sqlite3_native windows

Ruby 2.1.3p242 <2014-09-19 修订版 47630> [x64-mingw32]Rails 4.2.0.beta2

Ruby 2.1.3p242 <2014-09-19 revision 47630> [x64-mingw32] Rails 4.2.0.beta2

我在 64 位系统上运行 Windows 8.我一直在使用 c9(云托管的 ubuntu),但想开始在我的电脑上使用 RubyMine IDE 以使一切更快,但它带来了一些问题.

I'm running windows 8 on a 64 bit system. I have been using c9 (cloud hosted ubuntu) but want to start using RubyMine IDE on my pc to make everything faster but it's posing some problems.

我已经尝试了几乎所有推荐的方法,包括这个:如何在 Windows 上安装 sqlite3 for Ruby?

I've tried pretty much every recommended way including this one: How do I install sqlite3 for Ruby on Windows?

但我仍然收到相同的错误消息.非常感谢您的帮助!如果您对我有任何问题,请告诉我.

but I'm still getting the same error message. You help is much appreciated! Please let me know if you have any questions for me.

我运行 $rails s 时的完整错误消息:

Full Error message when I run $rails s:

C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta2/lib/active_support/dependencies.rb:248:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
    from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta2/lib/active_support/dependencies.rb:248:in `block in require'
    from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta2/lib/active_support/dependencies.rb:233:in `load_dependency'
    from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0.beta2/lib/active_support/dependencies.rb:248:in `require'
    from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/lib/sqlite3.rb:6:in `rescue in <top (required)>'
    from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/lib/sqlite3.rb:2:in `<top (required)>'
    from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:76:in `require'
    from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
    from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:72:in `each'
    from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:72:in `block in require'
    from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:61:in `each'
    from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler/runtime.rb:61:in `require'
    from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/bundler-1.7.4/lib/bundler.rb:133:in `require'
    from C:/Sites/aynulhabib-habib-framework-aca42deddccd/config/application.rb:7:in `<top (required)>'
    from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0.beta2/lib/rails/commands/commands_tasks.rb:78:in `require'
    from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0.beta2/lib/rails/commands/commands_tasks.rb:78:in `block in server'
    from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0.beta2/lib/rails/commands/commands_tasks.rb:75:in `tap'
    from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0.beta2/lib/rails/commands/commands_tasks.rb:75:in `server'
    from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0.beta2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/railties-4.2.0.beta2/lib/rails/commands.rb:17:in `<top (required)>'
    from C:/Sites/aynulhabib-habib-framework-aca42deddccd/bin/rails:8:in `require'
    from C:/Sites/aynulhabib-habib-framework-aca42deddccd/bin/rails:8:in `<top (required)>'
    from -e:1:in `load'
    from -e:1:in `<main>'

Process finished with exit code 1

推荐答案

问题是二进制 sqlite3 gem 不包含 Ruby 2.1.3 的预编译版本

The issue is that binary sqlite3 gem do not include pre-compiled versions for Ruby 2.1.3

这在 sqlite3-ruby 邮件列表中提到 这里.

This is mentioned in the sqlite3-ruby mailing list here.

相关文章