新手问题 rails server 时的 LoadError 错误

pcjjdy · 2014年10月04日 · 最后由 YingJie 回复于 2017年01月18日 · 3489 次阅读

显示 sqlite3.rb 文件下的 sqlite3/sqlite3_native有问题,但是不知道如何解决?

   C:\Users\pcjjdy\Desktop\text\rails_projects\first_app>rails server
C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7-x86-mingw32/l
ib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (L
oadError)
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7-
x86-mingw32/lib/sqlite3.rb:6:in `rescue in <top (required)>'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7-
x86-mingw32/lib/sqlite3.rb:2:in `<top (required)>'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/
lib/bundler/runtime.rb:72:in `require'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/
lib/bundler/runtime.rb:72:in `block (2 levels) in require'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/
lib/bundler/runtime.rb:70:in `each'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/
lib/bundler/runtime.rb:70:in `block in require'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/
lib/bundler/runtime.rb:59:in `each'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/
lib/bundler/runtime.rb:59:in `require'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/
lib/bundler.rb:132:in `require'
        from C:/Users/pcjjdy/Desktop/text/rails_projects/first_app/config/applic
ation.rb:7:in `<top (required)>'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.0
/lib/rails/commands.rb:76:in `require'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.0
/lib/rails/commands.rb:76:in `block in <top (required)>'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.0
/lib/rails/commands.rb:73:in `tap'
        from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.0
/lib/rails/commands.rb:73:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

没人知道么

bundle 了?或者是系统环境问题?

楼主解决了吗,我在 ubuntu 上的 我运行的时候报这个错

/home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError)
    from /home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
    from /home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
    from /home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
    from /home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
    from /home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
    from /home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
    from /home/windys/WorkSpace/HelloRails/config/application.rb:7:in `<top (required)>'
    from /home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:78:in `require'
    from /home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:78:in `block in server'
    from /home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `tap'
    from /home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:75:in `server'
    from /home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>'
    from /home/windys/WorkSpace/HelloRails/bin/rails:9:in `require'
    from /home/windys/WorkSpace/HelloRails/bin/rails:9:in `<top (required)>'
    from /home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.7.1/lib/spring/client/rails.rb:28:in `load'
    from /home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.7.1/lib/spring/client/rails.rb:28:in `call'
    from /home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.7.1/lib/spring/client/command.rb:7:in `call'
    from /home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.7.1/lib/spring/client.rb:30:in `run'
    from /home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.7.1/bin/spring:49:in `<top (required)>'
    from /home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.7.1/lib/spring/binstub.rb:11:in `load'
    from /home/ruby2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.7.1/lib/spring/binstub.rb:11:in `<top (required)>'
    from /home/ruby2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/ruby2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/windys/WorkSpace/HelloRails/bin/spring:13:in `<top (required)>'
    from bin/rails:3:in `load'
    from bin/rails:3:in `<main>'

需要 登录 后方可回复, 如果你还没有账号请 注册新账号