Comments (6)
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:in
create'
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:in
create'
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:in
create'
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:in
create_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:in
catch'
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:in
save_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:in
run_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:in
save'
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.
Same problem here as well. Anybody have an idea what could be the cause?
from do.
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.
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.
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.
thanks @fwolfst works for me!
from do.
Related Issues (20)
- Usage of .my.cnf file in do_mysql HOT 1
- Fixnum deprecated after ruby 2.4
- postgres - precision lost when casting on double precision HOT 2
- do_postgres won't install with postgresql-9.3 on Ubuntu 13.10 HOT 15
- do_postgres relies on server header files HOT 2
- do_mysql should not automatically coerce tinyint(1) values into bools
- Installing do_postgres fails on OSX maverick and brew install postgresql
- do_postgres does work with rubyinstaller version 2.1 HOT 3
- do_mysql and do_postgres don't run in ruby 2.2 HOT 6
- do_sqlite3:0.10.14 - LoadError: "cannot load such file -- do_sqlite3/2.1/do_sqlite3" HOT 1
- do_postgres appears to be truncating timestamp smaller than seconds HOT 1
- Time is losing timezone from DB and assuming local time zone
- Case sensitive error message test
- do_jdbc not compatible with jruby-9000 HOT 1
- Sqlite3 doesn't handle sub-second time in jruby
- Does not work with MySQL 5.7 HOT 14
- UTF-8-MB4 issues HOT 1
- SQLite DB Connection String ASCII characters
- Configurable pooling
- [do_postgres] Returning ID when bigint fails at `atoi` HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from do.