使用RubyMine(或IDEA与插件,相同的错误),当我尝试创建新项目和IDE开始生成文件时,得到这个
Error:[rake --prereqs] rake aborted!
LoadError: cannot load such file -- sqlite3/sqlite3_native
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/lib/sqlite3.rb:6:in `require'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/lib/sqlite3.rb:6:in `rescue in <top (required)>'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/lib/sqlite3.rb:2:in `<top (required)>'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:76:in `require'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:72:in `each'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:72:in `block in require'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:61:in `each'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:61:in `require'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler.rb:133:in `require'
D:/Dropbox/RubyProj/Test3/config/application.rb:7:in `<top (required)>'
D:/Dropbox/RubyProj/Test3/Rakefile:4:in `require'
D:/Dropbox/RubyProj/Test3/Rakefile:4:in `<top (required)>'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/rake_module.rb:28:in `load'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/rake_module.rb:28:in `load_rakefile'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:687:in `raw_load_rakefile'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:94:in `block in load_rakefile'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:93:in `load_rakefile'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:77:in `block in run'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
D:/Dropbox/RubyProj/Test3/bin/rake:4:in `<main>'
LoadError: cannot load such file -- sqlite3/2.1/sqlite3_native
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/lib/sqlite3.rb:4:in `require'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/lib/sqlite3.rb:4:in `<top (required)>'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:76:in `require'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:72:in `each'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:72:in `block in require'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:61:in `each'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:61:in `require'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler.rb:133:in `require'
D:/Dropbox/RubyProj/Test3/config/application.rb:7:in `<top (required)>'
D:/Dropbox/RubyProj/Test3/Rakefile:4:in `require'
D:/Dropbox/RubyProj/Test3/Rakefile:4:in `<top (required)>'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/rake_module.rb:28:in `load'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/rake_module.rb:28:in `load_rakefile'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:687:in `raw_load_rakefile'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:94:in `block in load_rakefile'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:93:in `load_rakefile'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:77:in `block in run'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
D:/Dropbox/RubyProj/Test3/bin/rake:4:in `<main>'
和这个
Error:Get available generators script executes with errors:
Error:DL is deprecated, please use Fiddle
Error:C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
Error: from C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/lib/sqlite3.rb:6:in `rescue in <top (required)>'
Error: from C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x64-mingw32/lib/sqlite3.rb:2:in `<top (required)>'
Error: from C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:76:in `require'
Error: from C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
Error: from C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:72:in `each'
Error: from C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:72:in `block in require'
Error: from C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:61:in `each'
Error: from C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler/runtime.rb:61:in `require'
Error: from C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/bundler-1.7.3/lib/bundler.rb:133:in `require'
Error: from D:/Dropbox/RubyProj/Test3/config/application.rb:7:in `<top (required)>'
Error: from C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:146:in `require'
Error: from C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:146:in `require_application_and_environment!'
Error: from C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:133:in `generate_or_destroy'
Error: from C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:51:in `generate'
Error: from C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
Error: from C:/tools/ruby213/lib/ruby/gems/2.1.0/gems/railties-4.1.6/lib/rails/commands.rb:17:in `<top (required)>'
Error: from D:/Dropbox/RubyProj/Test3/bin/rails:4:in `require'
Error: from D:/Dropbox/RubyProj/Test3/bin/rails:4:in `<main>'
如何解决? 安装了最后一个ruby(带有chocolatey)和rails 4.1.6(带有IDEA或RubyMine)
答案 0 :(得分:0)
sudo apt-get install libsqlite3-dev
。如果您在Windows中,在我的exp中,您只需要从http://mislav.uniqpath.com/rails/install-sqlite3/ 安装sqlite