
Migrations/Setup Don't create database
Reported by brianp | October 3rd, 2010 @ 04:02 AM | in 1.1
(I apologize for bad grammar)
Following the readme from: http://github.com/datamapper/dm-rails
Generate a new rails app via: rails new project_name -m http://datamapper.org/templates/rails.rb
Create a model:
class Person
include DataMapper::Resource
property :id, Serial
property :first_name, String, :required => true
property :last_name, String, :required => true
property :created_at, DateTime
property :created_on, Date
property :updated_at, DateTime
property :updated_on, Date
end
run rake db:migrate No errors occur but no progressive output is
displayed.
run rake db:setup or rake db:automigration and receive:
[datamapper] Created database 'core_development.db'
[datamapper] Created database 'core_test.db'
but no database is in fact created.
There are entries for a database generation in
logs/development.log but there is no path to a database file.
log file: http://www.pastie.org/private/kdy6azsbvahgwmrwb695bw
Rails -v 3.0.0
Ruby 1.9.2-head
RVM
Comments and changes to this ticket
-
Jonathan Stott (namelessjon) October 3rd, 2010 @ 06:52 AM
- State changed from new to unconfirmed
Could you also add your database.yml, please?
Though I suspect you're running into a known bug, and need to rename 'database' to 'path' in there.
-
egufov October 3rd, 2010 @ 12:14 PM
- Tag changed from ruby on rails, datamapper, dm, migrations, rials to dm-rails rails3, ruby on rails, datamapper, dm, migrations
this is the same problem as ticket #1425
-
egufov October 3rd, 2010 @ 12:29 PM
Jonathan Stott that fixed the problem i had in #1425
will this bug be fixed in the next release of dm-rails
and if it will maybe make shore that the .db file is place in the db instead of the root folder -
brianp October 3rd, 2010 @ 03:05 PM
Thanks, the issue was resolved with the database / path switch in the database.yml file.
Working database.yml file with appropriate db directory:
defaults: &defaults adapter: sqlite development: path: db/core_development.db <<: *defaults # Add more repositories # repositories: # repo1: # adapter: postgres # database: sample_development # username: the_user # password: secrets # host: localhost # repo2: # ... test: path: db/core_test.db <<: *defaults production: path: db/core_production.db <<: *defaults
-
Martin Gamsjaeger (snusnu) October 24th, 2010 @ 02:13 PM
- State changed from unconfirmed to resolved
- Milestone set to 1.1
- Assigned user set to Martin Gamsjaeger (snusnu)
- Milestone order changed from 196294 to 0
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Referenced by
-
1425 dm-rails not working with sqlite on windows - PLEASE CLOSE fixed with the fix mentions in #1426