Problem creating Rails application

2

When I create an application, at the time of doing a scaffold (following tutorials) I get the following error:

C:\Users\User\Usuarios>rails generate scaffold Usuario nome:string idade:integer
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x64-mingw32/lib/sqlite3.rb:6:in 'require': cannot load such file -
- sqlite3/sqlite3_native (LoadError)
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x64-mingw32/lib/sqlite3.rb:6:in 'rescue in <top (requ
ired)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x64-mingw32/lib/sqlite3.rb:2:in '<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/runtime.rb:76:in 'require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/runtime.rb:76:in 'block (2 levels) in requ
ire'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/runtime.rb:72:in 'each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/runtime.rb:72:in 'block in require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/runtime.rb:61:in 'each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler/runtime.rb:61:in 'require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.9.4/lib/bundler.rb:134:in 'require'
        from C:/Users/Claudanilo/Usuarios/config/application.rb:7:in '<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:141:in 'require'

        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:141:in 'require_
application_and_environment!'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:128:in 'generate
_or_destroy'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:50:in 'generate'

        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in 'run_comma
nd!'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.1/lib/rails/commands.rb:17:in '<top (required)>'
        from bin/rails:4:in 'require'
        from bin/rails:4:in '<main>'

What's going wrong?

    
asked by anonymous 28.04.2015 / 19:47

1 answer

1

Friend if you still want to try in Windows the solution is to install Ruby 2.0.0 and Rails again in this older version. I'm also studying in Windows and I had the same problem, but mine was when running the rake db:create command to create the application database. The reason for this problem is that sqlite3 1.3.10 is not compatible (in Windows I believe) with Ruby 2.2.2.

    
01.05.2015 / 01:02