Need help -FATAL: database "catarse_development" does not exist

Hi
i try to run this
rake db:migrate

How i fix this
i get this
[root@localhost catarse]# rake db:migrate
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in
`block in require’: iconv will be deprecated in the future, use
String#encode instead.

        You no longer need to have jasmine.rake in your project, as

it is now automatically loaded
from the Jasmine gem. To silence this warning, set
“USE_JASMINE_RAKE=true” in your environment
or remove jasmine.rake.

problem while using OauthProvider model:
‘FATAL: database “catarse_development” does not exist

[deprecated] I18n.enforce_available_locales will default to true in the
future. If you really want to skip validation of your locale you can set
I18n.enforce_available_locales = false to avoid this message.
rake aborted!
FATAL: database “catarse_development” does not exist
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:831:in
initialize' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:831:innew’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:831:in
connect' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:548:ininitialize’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in
new' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:41:inpostgresql_connection’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:440:in
new_connection' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:450:incheckout_new_connection’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:421:in
acquire_connection' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:356:inblock in checkout’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in
checkout' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:inblock in connection’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in
connection' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:546:inretrieve_connection’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/connection_handling.rb:79:in
retrieve_connection' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/connection_handling.rb:53:inconnection’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/model_schema.rb:203:in
table_exists?' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/attribute_methods/primary_key.rb:92:inget_primary_key’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/attribute_methods/primary_key.rb:77:in
reset_primary_key' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-4.0.2/lib/active_record/attribute_methods/primary_key.rb:65:inprimary_key’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/protected_attributes-1.0.5/lib/active_record/mass_assignment_security/attribute_assignment.rb:15:in
attributes_protected_by_default' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/protected_attributes-1.0.5/lib/active_model/mass_assignment_security.rb:332:inblock in protected_attributes_configs’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/protected_attributes-1.0.5/lib/active_model/mass_assignment_security.rb:217:in
yield' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/protected_attributes-1.0.5/lib/active_model/mass_assignment_security.rb:217:indefault’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/protected_attributes-1.0.5/lib/active_model/mass_assignment_security.rb:217:in
protected_attributes' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/protected_attributes-1.0.5/lib/active_model/mass_assignment_security.rb:123:inblock in attr_protected’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/protected_attributes-1.0.5/lib/active_model/mass_assignment_security.rb:122:in
each' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/protected_attributes-1.0.5/lib/active_model/mass_assignment_security.rb:122:inattr_protected’
/root/catarse/app/models/contribution.rb:34:in <class:Contribution>' /root/catarse/app/models/contribution.rb:2:in<top (required)>’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:424:in
load' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:424:inblock in load_file’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:616:in
new_constants_in' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:423:inload_file’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:324:in
require_or_load' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:463:inload_missing_constant’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:184:in
const_missing' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/inflector/methods.rb:226:inconst_get’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/inflector/methods.rb:226:in
block in constantize' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/inflector/methods.rb:224:ineach’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/inflector/methods.rb:224:in
inject' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/inflector/methods.rb:224:inconstantize’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/core_ext/string/inflections.rb:66:in
constantize' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rails-observers-0.1.2/lib/rails/observers/active_model/observing.rb:309:inblock in observe’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/rails-observers-0.1.2/lib/rails/observers/active_model/observing.rb:309:in
collect!' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rails-observers-0.1.2/lib/rails/observers/active_model/observing.rb:309:inobserve’
/root/catarse/app/observers/contribution_observer.rb:2:in
<class:ContributionObserver>' /root/catarse/app/observers/contribution_observer.rb:1:in<top
(required)>’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:424:in
load' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:424:inblock in load_file’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:616:in
new_constants_in' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:423:inload_file’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:324:in
require_or_load' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:463:inload_missing_constant’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:184:in
const_missing' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/inflector/methods.rb:226:inconst_get’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/inflector/methods.rb:226:in
block in constantize' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/inflector/methods.rb:224:ineach’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/inflector/methods.rb:224:in
inject' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/inflector/methods.rb:224:inconstantize’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/core_ext/string/inflections.rb:66:in
constantize' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rails-observers-0.1.2/lib/rails/observers/active_model/observing.rb:183:ininstantiate_observer’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/rails-observers-0.1.2/lib/rails/observers/active_model/observing.rb:108:in
block in instantiate_observers' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rails-observers-0.1.2/lib/rails/observers/active_model/observing.rb:108:ineach’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/rails-observers-0.1.2/lib/rails/observers/active_model/observing.rb:108:in
instantiate_observers' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rails-observers-0.1.2/lib/rails/observers/railtie.rb:24:inblock (2 levels) in class:Railtie
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:38:in
instance_eval' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:38:inexecute_hook’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:28:in
block in on_load' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:27:ineach’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:27:in
on_load' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/rails-observers-0.1.2/lib/rails/observers/railtie.rb:23:inblock in class:Railtie
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:36:in
call' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:36:inexecute_hook’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:45:in
block in run_load_hooks' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:44:ineach’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/lazy_load_hooks.rb:44:in
run_load_hooks' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/railties-4.0.2/lib/rails/application/finisher.rb:62:inblock in module:Finisher
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/railties-4.0.2/lib/rails/initializable.rb:30:in
instance_exec' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/railties-4.0.2/lib/rails/initializable.rb:30:inrun’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/railties-4.0.2/lib/rails/initializable.rb:55:in
block in run_initializers' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/railties-4.0.2/lib/rails/initializable.rb:54:inrun_initializers’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/railties-4.0.2/lib/rails/application.rb:215:in
initialize!' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:inmethod_missing’
/root/catarse/config/environment.rb:7:in <top (required)>' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:inrequire’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in
block in require' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:inload_dependency’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in
require' /usr/local/rvm/gems/ruby-1.9.3-p484/gems/railties-4.0.2/lib/rails/application.rb:189:inrequire_environment!’
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/railties-4.0.2/lib/rails/application.rb:250:in
block in run_tasks_blocks' /usr/local/rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:ineval’
/usr/local/rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in
`’
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

On Mon, Feb 17, 2014 at 1:18 PM, Pop P. [email protected] wrote:

i try to run this
rake db:migrate

How i fix this

[root@localhost catarse]# rake db:migrate

FATAL: database “catarse_development” does not exist

Does it not seem pretty apparent that you can’t run a migration on a
non-existent database?

And the answer to that situation would be “create it first”?

You might want to try rake -T to see what kind of things you can do
with rake besides run migrations.

P.S. Doing development-related tasks as ‘root’ is almost certainly a
Very Bad Idea – just sayin’ …

HTH,

Hassan S. ------------------------ [email protected]

twitter: @hassan

Hi i try to do that createdb mytestdb
[root@localhost catarse]# createdb mytestdb
createdb: could not connect to database postgres: FATAL: role “root”
does not exist
give this Errer
thanks

you want to do: rake db:create

yes i want to rake db:create
and fix the Errer 'FATAL: database “catarse_development” does not exist
How i fix that

On 18 February 2014 12:11, Pop P. [email protected] wrote:

yes i want to rake db:create
and fix the Errer 'FATAL: database “catarse_development” does not exist
How i fix that

I think that it was rake db:migrate that gave you that error, I think
it unlikely that db:create also gave it. If it does then copy/paste
the command and result here.

Also please remember to quote the previous message, this is an email
list not a forum, though you may be accessing it via a forum like
interface.

Colin