Question

As far as I can tell, I've installed everything correctly, however I still can't run my program. To be clear, this was written on linux, and I'm now trying to run it on a windows machine.

I have the following gem list:

*** LOCAL GEMS ***

addressable (2.2.7, 2.2.6)
akami (1.2.2)
backports (3.6.0)
bcrypt (3.1.7 x64-mingw32)
bcrypt-ruby (3.1.5 x64-mingw32)
bigdecimal (1.2.0)
builder (3.2.2, 3.1.4)
bundle (0.0.1)
bundler (1.6.2)
daemons (1.1.9)
data_mapper (1.2.0)
data_objects (0.10.14)
dm-aggregates (1.2.0)
dm-constraints (1.2.0)
dm-core (1.2.0)
dm-do-adapter (1.2.0)
dm-migrations (1.2.0)
dm-serializer (1.2.2)
dm-sqlite-adapter (1.2.0)
dm-timestamps (1.2.0)
dm-transactions (1.2.0)
dm-types (1.2.2)
dm-validations (1.2.0)
do_sqlite3 (0.10.14)
encryptor (1.3.0)
fastercsv (1.5.5)
gyoku (1.1.1, 1.1.0)
haml (4.0.5)
httpi (2.1.0)
io-console (0.4.2)
json (1.8.1, 1.7.7)
json_pure (1.8.1)
mail (2.5.4)
mime-types (1.25.1)
mini_portile (0.5.3, 0.5.2)
minitest (4.3.2)
multi_json (1.9.2)
nokogiri (1.6.2.rc2 x64-mingw32)
nori (2.4.0)
polyglot (0.3.3)
pony (1.6.2)
psych (2.0.0)
puma (2.8.2)
rack (1.5.2)
rack-protection (1.5.2)
rack-test (0.6.2)
rake (0.9.6)
rdoc (4.0.0)
rubyntlm (0.3.4)
savon (2.5.0)
sinatra (1.4.4)
sinatra-contrib (1.4.2)
sinatra-static-assets (1.0.3)
sqlite3 (1.3.9 x64-mingw32)
stringex (1.5.1)
test-unit (2.0.0.0)
tilt (1.4.1)
treetop (1.4.15)
uuidtools (2.1.4)
wasabi (3.3.0)

sqlite3 was compiled from source, and installed using gem install sqlite3 -- --with-sqlite3-include=c:/sources/sqlite3 --with-sqlite3-lib=c:/sources/sqlite3/.libs to success.

The required gems in the main ruby file are:

require 'sinatra'
require 'sinatra/static_assets'
require 'sinatra/cookies'
require 'haml'
require 'savon'
require 'encryptor'
require 'pony'
require 'open-uri'
require 'json'
require 'data_mapper'

I should note running each of those requires inside irb all return true with no errors. When running ruby main.rb, I'm met with:

c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:126:in `require': cannot load such file -- do_sqlite3/2.0/do_sqlite3 (LoadError)
        from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:126:in `require'
        from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/backports-3.6.0/lib/backports/tools.rb:343:in `require_with_backports'
        from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/do_sqlite3-0.10.14/lib/do_sqlite3.rb:32:in `rescue in <top (required)>'
        from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/do_sqlite3-0.10.14/lib/do_sqlite3.rb:27:in `<top (required)>'
        from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `require'
        from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
        from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:144:in `require'
        from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/backports-3.6.0/lib/backports/tools.rb:343:in `require_with_backports'
        from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/dm-sqlite-adapter-1.2.0/lib/dm-sqlite-adapter/adapter.rb:1:in `<top (required)>'
        from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/backports-3.6.0/lib/backports/tools.rb:343:in `require_with_backports'
        from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/dm-sqlite-adapter-1.2.0/lib/dm-sqlite-adapter.rb:1:in `<top (required)>'
        from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `require'
        from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
        from c:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:144:in `require'
        from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/backports-3.6.0/lib/backports/tools.rb:343:in `require_with_backports'
        from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:163:in `load_adapter'
        from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:133:in `adapter_class'
        from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:13:in `new'
        from c:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/dm-core-1.2.0/lib/dm-core.rb:230:in `setup'
        from rxsite.rb:14:in `<main>'

Usually I would go through the steps I've tried so far to solve this, but I'm don't actually know where to start with this. I can only assume it's an issue with the way I installed sqlite3

Was it helpful?

Solution

Fixed this by removing x64 ruby, and installing x86 ruby.

Seems like a lot of problems stem from using the 64bit version.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top