Rails migration problem, Table doesn't exist

Hello, I’m starting with Rails. I have problems at the time of
migration.
The steps I follow are:
rake db:create:all
rake db:migrate
then

rake aborted!
Mysql2::Error: Table ‘lpaguide.resources’ doesn’t exist: SHOW FIELDS
FROM
resources
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/connection_adapters/mysql2_adapter.rb:288:in
query' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/connection_adapters/mysql2_adapter.rb:288:inblock in execute’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/connection_adapters/abstract_adapter.rb:245:in
block in log' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/notifications/instrumenter.rb:21:ininstrument’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/connection_adapters/abstract_adapter.rb:240:in
log' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/connection_adapters/mysql2_adapter.rb:288:inexecute’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/connection_adapters/mysql2_adapter.rb:474:in
columns' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:95:inblock (2 levels) in initialize’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:185:in
with_connection' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:92:inblock in initialize’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:106:in
yield' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:106:indefault’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:106:in
block in initialize' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/base.rb:717:inyield’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/base.rb:717:in
default' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/base.rb:717:incolumns_hash’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/base.rb:827:in
descends_from_active_record?' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/base.rb:833:infinder_needs_type_condition?’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/base.rb:985:in
relation' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/named_scope.rb:36:inscoped’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/base.rb:444:in
where' /var/www/lpaguide/app/models/event.rb:9:inclass:Event
/var/www/lpaguide/app/models/event.rb:1:in <top (required)>' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:240:inrequire’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:240:in
block in require' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:225:inload_dependency’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:240:in
require' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:348:inrequire_or_load’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:489:in
load_missing_constant' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:181:inblock in const_missing’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:179:in
each' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:179:inconst_missing’
/var/www/lpaguide/app/admin/events.rb:1:in <top (required)>' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:234:inload’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:234:in
block in load' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:225:inload_dependency’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:234:in
load' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activeadmin-0.4.0/lib/active_admin/application.rb:161:inblock in load!’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activeadmin-0.4.0/lib/active_admin/application.rb:161:in
each' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activeadmin-0.4.0/lib/active_admin/application.rb:161:inload!’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activeadmin-0.4.0/lib/active_admin/application.rb:187:in
routes' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activeadmin-0.4.0/lib/active_admin.rb:78:inroutes’
/var/www/lpaguide/config/routes.rb:51:in block in <top (required)>' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.1.10/lib/action_dispatch/routing/route_set.rb:264:ininstance_exec’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.1.10/lib/action_dispatch/routing/route_set.rb:264:in
eval_block' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.1.10/lib/action_dispatch/routing/route_set.rb:241:indraw’
/var/www/lpaguide/config/routes.rb:1:in <top (required)>' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:234:inload’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:234:in
block in load' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:225:inload_dependency’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:234:in
load' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.1.10/lib/rails/application/routes_reloader.rb:29:inblock in load_paths’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.1.10/lib/rails/application/routes_reloader.rb:29:in
each' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.1.10/lib/rails/application/routes_reloader.rb:29:inload_paths’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.1.10/lib/rails/application/routes_reloader.rb:13:in
reload!' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.1.10/lib/rails/application.rb:87:inreload_routes!’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activeadmin-0.4.0/lib/active_admin/reloader.rb:34:in
reload!' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activeadmin-0.4.0/lib/active_admin/reloader.rb:98:inreload!’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activeadmin-0.4.0/lib/active_admin/reloader.rb:93:in
block in initialize' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/file_update_checker.rb:32:incall’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/file_update_checker.rb:32:in
execute_if_updated' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activeadmin-0.4.0/lib/active_admin/reloader.rb:84:inexecute_if_updated’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activeadmin-0.4.0/lib/active_admin/reloader.rb:110:in
block in attach!' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/callbacks.rb:404:in_run_prepare_callbacks’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/callbacks.rb:81:in
run_callbacks' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/actionpack-3.1.10/lib/action_dispatch/middleware/reloader.rb:46:inprepare!’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.1.10/lib/rails/application/finisher.rb:41:in
block in <module:Finisher>' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.1.10/lib/rails/initializable.rb:30:ininstance_exec’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.1.10/lib/rails/initializable.rb:30:in
run' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.1.10/lib/rails/initializable.rb:55:inblock in run_initializers’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.1.10/lib/rails/initializable.rb:54:in
each' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.1.10/lib/rails/initializable.rb:54:inrun_initializers’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.1.10/lib/rails/application.rb:96:in
initialize!' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.1.10/lib/rails/railtie/configurable.rb:30:inmethod_missing’
/var/www/lpaguide/config/environment.rb:5:in <top (required)>' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:240:inrequire’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:240:in
block in require' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:223:inblock in load_dependency’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:640:in
new_constants_in' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:223:inload_dependency’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:240:in
require' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.1.10/lib/rails/application.rb:83:inrequire_environment!’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.1.10/lib/rails/application.rb:203:in
block (2 levels) in initialize_tasks' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/task.rb:228:incall’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/task.rb:228:in
block in execute' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/task.rb:223:ineach’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/task.rb:223:in
execute' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/task.rb:166:inblock in invoke_with_call_chain’
/home/deployer/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/monitor.rb:211:in
mon_synchronize' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/task.rb:159:ininvoke_with_call_chain’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/task.rb:187:in
block in invoke_prerequisites' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/task.rb:185:ineach’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/task.rb:185:in
invoke_prerequisites' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/task.rb:165:inblock in invoke_with_call_chain’
/home/deployer/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/monitor.rb:211:in
mon_synchronize' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/task.rb:159:ininvoke_with_call_chain’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/task.rb:152:in
invoke' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/application.rb:143:ininvoke_task’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/application.rb:101:in
block (2 levels) in top_level' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/application.rb:101:ineach’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/application.rb:101:in
block in top_level' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/application.rb:110:inrun_with_threads’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/application.rb:95:in
top_level' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/application.rb:73:inblock in run’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/application.rb:160:in
standard_exception_handling' /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/application.rb:70:inrun’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/bin/rake:33:in
<top (required)>' /home/deployer/.rvm/gems/ruby-1.9.3-p448/bin/rake:23:inload’
/home/deployer/.rvm/gems/ruby-1.9.3-p448/bin/rake:23:in `’

I do not know what could be the problem, please help :slight_smile:

Hello ,
I think rake db:create not create:all
its better to use always bundle exec rake db:create
and bundle exec rake db:migrate and bundle exec rake db:seed

*or instead of all these commands *you can use also this command
bundle
exec rake db:setup

On Sun, Oct 13, 2013 at 1:35 AM, Jos Mara del Pozo <
[email protected]> wrote:

`query’

/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/connection_adapters/mysql2_adapter.rb:474:in

`default’

/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.1.10/lib/active_record/base.rb:833:in

`require’

/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:181:in

/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:225:in

`routes’

/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:234:in

`each’

/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activeadmin-0.4.0/lib/active_admin/reloader.rb:93:in

`_run_prepare_callbacks’

/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.1.10/lib/rails/initializable.rb:55:in

/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:240:in

`require’

/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/task.rb:223:in

`each’

/home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/rake-10.0.3/lib/rake/application.rb:143:in

`top_level’

https://groups.google.com/d/msgid/rubyonrails-talk/04a8364a-12a1-4afb-9591-4a0b1f1ee05f%40googlegroups.com

.
For more options, visit https://groups.google.com/groups/opt_out.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs