Note that there are some explanatory texts on larger screens.

plurals
  1. POruby postgreSQL on AMD64
    text
    copied!<p><strong>---------------- EDIT ----------------</strong></p> <p>I've tried what @Duk said, and still nothing work. After trying a little more, i figured out that the problem isn't on DataMapper. In fact it's the postgreSQL adapter that fails on AMD64.</p> <p>I have binary distribution of PostgreSQL (the last one found on their site) and I got all the gems by doing a </p> <pre><code>gem install... </code></pre> <p>Someone can help me ?</p> <p><strong>---------------- ORIGINAL ----------------</strong></p> <p>Following the "Get Started" from DataMapper website, i ran across this example : </p> <pre><code># A Postgres connection: DataMapper.setup(:default, 'postgres://localhost/the_database_name') </code></pre> <p>I have my postgre database installed, DataMapper and every dependency (dev-kit included) Here's the code :</p> <pre><code>gem 'data_mapper' require 'dm-core' require 'dm-migrations/adapters/dm-postgres-adapter' # If you want the logs displayed you have to do this before the call to setup DataMapper::Logger.new($stdout, :debug) # A Postgres connection: DataMapper.setup(:default, 'postgres://localhost/test') </code></pre> <p>But when I run it, this error occurs :</p> <pre><code>D:/dev/Ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': 193: %1 n?est pas une application Win32 valide. - D:/dev/Ruby/lib/ruby/gems/1.9.1/gems/do_postgres-0.10.8-x86-mingw32/lib/do_postgres/1.9/do_postgres.so (LoadError) from D:/dev/Ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from D:/dev/Ruby/lib/ruby/gems/1.9.1/gems/do_postgres-0.10.8-x86-mingw32/lib/do_postgres.rb:30:in `rescue in &lt;top (required)&gt;' from D:/dev/Ruby/lib/ruby/gems/1.9.1/gems/do_postgres-0.10.8-x86-mingw32/lib/do_postgres.rb:25:in `&lt;top (required)&gt;' from D:/dev/Ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from D:/dev/Ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from D:/dev/Ruby/lib/ruby/gems/1.9.1/gems/dm-postgres-adapter-1.2.0/lib/dm-postgres-adapter/adapter.rb:1:in `&lt;top (required)&gt;' from D:/dev/Ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from D:/dev/Ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from D:/dev/Ruby/lib/ruby/gems/1.9.1/gems/dm-postgres-adapter-1.2.0/lib/dm-postgres-adapter.rb:1:in `&lt;top (required)&gt;' from D:/dev/Ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `require' from D:/dev/Ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require' from D:/dev/Ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require' from D:/dev/Ruby/lib/ruby/gems/1.9.1/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:163:in `load_adapter' from D:/dev/Ruby/lib/ruby/gems/1.9.1/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:133:in `adapter_class' from D:/dev/Ruby/lib/ruby/gems/1.9.1/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:13:in `new' from D:/dev/Ruby/lib/ruby/gems/1.9.1/gems/dm-core-1.2.0/lib/dm-core.rb:228:in `setup' from D:/dev/workspace/ruby/training/bin/pg/main.rb:8:in `&lt;top (required)&gt;' from -e:1:in `load' from -e:1:in `&lt;main&gt;' </code></pre> <p>The error occurs on "load_adapter" function :</p> <pre><code> require "dm-#{name}-adapter" </code></pre> <p>Apparently the file isn't found. I've tryed to include the adapter manually as proposed <a href="https://stackoverflow.com/questions/7621106/adapters-not-working-with-datamapper">here</a> but without success.</p> <p>Any idea ? thanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload