We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seeing an error when I attempt to drop a database using the padrino-gen dm:drop rake task. Firing up the console and running
1.9.3-p392 :001 > DataMapper.repository.adapter.options.symbolize_keys => {:scheme=>"postgres", :user=>nil, :password=>nil, :host=>"localhost", :port=>nil, :path=>"/some_database", :query=>nil, :fragment=>nil, :adapter=>"postgres"}
So basically it looks like the system call in datamapper.rb:91 is missing the user and database fields it's expecting.
system
datamapper.rb:91
user
database
Here's the full backtrace:
$ rake dm:drop => Dropping database 'kenkeiter:password@some_database' rake aborted! can't convert nil into String /Users/kenkeiter/.rvm/gems/ruby-1.9.3-p392/gems/padrino-gen-0.11.1/lib/padrino-gen/padrino-tasks/datamapper.rb:91:in `system' /Users/kenkeiter/.rvm/gems/ruby-1.9.3-p392/gems/padrino-gen-0.11.1/lib/padrino-gen/padrino-tasks/datamapper.rb:91:in `block (2 levels) in <top (required)>' /Users/kenkeiter/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval' /Users/kenkeiter/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>' Tasks: TOP => dm:drop (See full trace by running task with --trace)
Digging into the doc for DataMapper (http://rubydoc.info/github/datamapper/dm-core/master/DataMapper) it appears that there are two ways to specify connection details. The shorthand way:
DataMapper.setup(:default, 'postgres://root:supahsekret@127.0.0.1/dm_core_test')
and the longhand way:
DataMapper.setup(:default, { :adapter => 'adapter_name_here', :database => 'path/to/repo', :username => 'username', :password => 'password', :host => 'hostname' })
I'm imagining the long-hand way was expected, since it seems to yield the keys that datamapper.rb:91's system call is expecting.
The text was updated successfully, but these errors were encountered:
@kenkeiter ran into this with something like
DataMapper.setup(:default, "postgres://ortuna@127.0.0.1/dev_db")
It seems the arguments being passed where a bit fragile when passed to #system. Hopefully our issues are the same issue.
Sorry, something went wrong.
@kenkeiter have you had a chance to verify this fix? Thanks!
Closing for now, @kenkeiter, please tell us if @Ortuna fix worked. Thanks @Ortuna
No branches or pull requests
Seeing an error when I attempt to drop a database using the padrino-gen dm:drop rake task. Firing up the console and running
So basically it looks like the
system
call indatamapper.rb:91
is missing theuser
anddatabase
fields it's expecting.Here's the full backtrace:
Digging into the doc for DataMapper (http://rubydoc.info/github/datamapper/dm-core/master/DataMapper) it appears that there are two ways to specify connection details. The shorthand way:
and the longhand way:
I'm imagining the long-hand way was expected, since it seems to yield the keys that
datamapper.rb:91
'ssystem
call is expecting.The text was updated successfully, but these errors were encountered: