Install Windows / Ruby / Rails ---. Cannot download such a file - sqlite3 / sqlite3_native windows

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

I am running Windows 8 on a 64 bit system. I am using c9 (the ubuntu cloud node), but I want to start using the RubyMine IDE on my computer to make things faster, but this creates some problems.

I tried almost every recommended method, including this one: How to install sqlite3 for Ruby on Windows?

but I still get the same error message. You help, really appreciate! Please let me know if you have any questions for me.

Full error message when starting $ 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 
+5
ruby ruby-on-rails windows-8 ruby-on-rails-3 sqlite3
Oct 29 '14 at 17:01
source share
3 answers

The problem is that sqlite3-gem binary does not contain precompiled versions for Ruby 2.1.3

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

+4
Oct 29 '14 at 18:45
source share

Fortunately, you do not need to switch to ruby ​​2.0
there is a solution to this problem after endless attempts ...

https://github.com/hwding/sqlite3-ruby-win




Actions

Pre

  • gem uninstall sqlite3 --all

Source

Build

  • run command line in extracted directory
  • make sure your C compiler is installed and added to PATH
  • gem install bundler
  • bundle install
  • rake native gem
  • you will find the director named 'pkg' generated

Installation

  • enter dir 'pkg'
  • gem install --local sqlite3-xxx.gem ('xxx' is the version code)

Verify

  • irb
  • require 'sqlite3'
+8
Aug 25 '16 at 3:52
source share

In the folder of your project, open a terminal and execute:

sqlite3 service pack

nokogiri batch update

I hope I helped you;)

+1
Oct 21 '17 at 19:29
source share



All Articles