Coder Social home page Coder Social logo

Comments (6)

tcwinn avatar tcwinn commented on July 19, 2024

I'm also observing this issue (see below error). The same code worked under dm 1.0.2.

Here are my gem list:
[root@mimic-scale rack]# gem list

*** LOCAL GEMS ***

addressable (2.2.8)
bcrypt-ruby (3.0.1)
daemon_controller (1.0.0)
data_mapper (1.2.0)
data_objects (0.10.8)
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-mysql-adapter (1.2.0)
dm-serializer (1.2.1)
dm-timestamps (1.2.0)
dm-transactions (1.2.0)
dm-types (1.2.1)
dm-validations (1.2.0)
do_mysql (0.10.8)
fastercsv (1.5.5)
fastthread (1.0.7)
json (1.6.7)
json_pure (1.6.7)
multi_json (1.0.4)
nokogiri (1.5.5)
passenger (3.0.13)
rack (1.4.1)
rake (0.9.2.2)
stringex (1.3.3)
uuidtools (2.1.2)

/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:114:in execute_non_query': Table 'cl_1.nodes' doesn't exist (DataObjects::SyntaxError) from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:114:increate'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:276:in with_connection' from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:113:increate'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:85:in each' from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:85:increate'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/repository.rb:146:in create' from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/transient.rb:61:increate_resource'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/resource/persistence_state/transient.rb:25:in commit' from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/resource.rb:956:in_persist'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/resource.rb:970:in create_with_hooks' from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/resource.rb:967:incatch'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/resource.rb:967:in create_with_hooks' from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/resource.rb:1021:insave_self'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/resource.rb:1006:in _save' from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/resource.rb:1222:inrun_once'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/resource.rb:1005:in _save' from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/resource.rb:405:insave'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/model.rb:717:in __send__' from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/model.rb:717:in _create'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/model.rb:457:increate' from dm_create.rb:46 from dm_create.rb:44:in each'
from dm_create.rb:44
from dm_create.rb:42:inopen' from dm_create.rb:42 from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core.rb:263:in repository'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/repository.rb:114:inscope' from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core.rb:263:in repository'
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/dm-core-1.2.0/lib/dm-core/core_ext/kernel.rb:20:inrepository' from dm_create.rb:39 from dm_create.rb:37:in each'
from dm_create.rb:37

from do.

jonasschneider avatar jonasschneider commented on July 19, 2024

Same problem here as well. Anybody have an idea what could be the cause?

from do.

dbussink avatar dbussink commented on July 19, 2024

You are probably creating two in memory connection which isn't supported. You probably need to use a full path in the URL, if Sqlite can't open the file specified, it will fallback to an in memory connection.

Does this work properly if you use a full path in the url to a file for the database?

from do.

fwolfst avatar fwolfst commented on July 19, 2024

At least it does not work for me (with dm-core 1.2.1).

The changes to use full path look like:

DataMapper.setup(:default, "sqlite://#{Dir.pwd}/foo.sqlite")
DataMapper.setup(:lite, "sqlite://#{Dir.pwd}/foo2.sqlite")

from do.

fwolfst avatar fwolfst commented on July 19, 2024

It works if I auto_migrate the model in the repository block like this:

DataMapper.repository(:lite) {
  Foo.auto_migrate!
  Foo.create(:name => "bar")
}

from do.

danielmoralesp avatar danielmoralesp commented on July 19, 2024

thanks @fwolfst works for me!

from do.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.