0

I decided to start learning ruby/rails and went to install it on one of my windows machines via RubyInstaller. I got 2.2.0 installed, got the DevKit installed, ran gem install rails, and that worked.

Then I made a new project rails new project and created the folder and ran bundle install inside it. However, when going into the project folder and running rails server I get a the following error:

C:/Ruby22/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x86-mingw32/lib/sqlite3.rb:6:i
n `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x86-mingw32/lib/s
qlite3.rb:6:in `rescue in <top (required)>'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.10-x86-mingw32/lib/s
qlite3.rb:2:in `<top (required)>'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runti
me.rb:76:in `require'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runti
me.rb:76:in `block (2 levels) in require'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runti
me.rb:72:in `each'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runti
me.rb:72:in `block in require'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runti
me.rb:61:in `each'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runti
me.rb:61:in `require'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler.rb:13
4:in `require'
        from C:/Users/Jeff/Documents/GameDB/config/application.rb:7:in `<top (re
quired)>'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/command
s/commands_tasks.rb:78:in `require'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/command
s/commands_tasks.rb:78:in `block in server'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/command
s/commands_tasks.rb:75:in `tap'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/command
s/commands_tasks.rb:75:in `server'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/command
s/commands_tasks.rb:39:in `run_command!'
        from C:/Ruby22/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/command
s.rb:17:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

I initially tried following another question on SO and tried rake db:create but got a similar error for SQLite. In another question they suggested changing s.required_path from ['lib'] to ['lib/sqlite3_native'] or similar, and that fixed the error for SQLite, but not the others. It will be impractical, and impossible for me, to go through each gem config and fix this.

What is the best way to correct the paths for these gems?

4
  • 1
    Did you do bundle install? Commented Aug 10, 2015 at 5:16
  • I hadn't, but I still get the same error afterwards. Commented Aug 10, 2015 at 5:19
  • Have you ensured you have the sqlite gem in the Gemfile? Commented Aug 10, 2015 at 5:19
  • @Jerry bundle show sqlite3 returns a path, I'm still new to ruby so I don't know if that qualifies. Commented Aug 10, 2015 at 5:21

1 Answer 1

1

As mentioned in this sqlite GitHub issue, it looks like there is no support for the particular version of Ruby that you are using. This seems to be a problem specifically on the Windows platform. Perhaps you should downgrade the Ruby version for now if you really can't change any of the other environmental variables.

Sign up to request clarification or add additional context in comments.

1 Comment

I tried this out, but I'm getting no end of other problems, currently tackling an SSL issue with downloading gems on an older ruby version...I'll get back to you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.