Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Could not find table 'events' #270

Closed
losingle opened this Issue Jun 18, 2012 · 12 comments

Comments

Projects
None yet
3 participants

I follow Installation document.

Installation
Add the following to the Gemfile of the your Rails application:

gem 'social_stream', '>= 0.19.0'
and run:

bundle
Then:

rails generate social_stream:install
Do not forget to migrate your database

rake db:migrate

I have the problem:

Showing /Library/Ruby/Gems/1.8/gems/social_stream-events-0.13.2/app/views/events/_calendar_month.erb where line #1 raised:
Could not find table 'events'

my rails version is 3.2.6

Contributor

atd commented Jun 18, 2012

Hi @losingle

what is the output of rake db:migrate ?

@atd I did it.
but I have the error message
"Couldn't find ObjectChannelsToActions::Channel without an ID"

Contributor

atd commented Jun 18, 2012

I have not any doubt you did it. But it is really hard to figure out the cause without any data

more data

== ObjectChannelsToActions: migrating ========================================
-- add_column(:activity_actions, :author, :boolean, {:default=>false})
-> 0.0042s
-- add_column(:activity_actions, :user_author, :boolean, {:default=>false})
-> 0.0004s
-- add_column(:activity_actions, :owner, :boolean, {:default=>false})
-> 0.0004s
rake aborted!
An error has occurred, this and all later migrations canceled:

Couldn't find ObjectChannelsToActions::Channel without an ID
/Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/relation/finder_methods.rb:310:in find_with_ids' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/relation/finder_methods.rb:107:infind'
/Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/querying.rb:5:in __send__' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/querying.rb:5:infind'
/Users/losingle/Documents/workspace/rails/sns/db/migrate/20120618145225_object_channels_to_actions.social_stream_base_engine.rb:15:in up' /Users/losingle/Documents/workspace/rails/sns/db/migrate/20120618145225_object_channels_to_actions.social_stream_base_engine.rb:14:ineach'
/Users/losingle/Documents/workspace/rails/sns/db/migrate/20120618145225_object_channels_to_actions.social_stream_base_engine.rb:14:in `up'

Contributor

atd commented Jun 18, 2012

Much better!

Are you upgrading or installing from scratch? It seems there is inconsistent data in your database

I don't know whether there is inconsistent data in my database.
but my database don't have the 'events' table.

my full trace.

rake db:migrate --trace
Faraday: you may want to install system_timer for reliable timeouts
WARNING: using the built-in Timeout class which is known to have issues when used for opening connections. Install the SystemTimer gem if you want to make sure the Redis client will not hang.
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:load_config
** Execute db:migrate
== ObjectChannelsToActions: migrating ========================================
-- add_column(:activity_actions, :author, :boolean, {:default=>false})
-> 0.0044s
-- add_column(:activity_actions, :user_author, :boolean, {:default=>false})
-> 0.0004s
-- add_column(:activity_actions, :owner, :boolean, {:default=>false})
-> 0.0004s
rake aborted!
An error has occurred, this and all later migrations canceled:

Couldn't find ObjectChannelsToActions::Channel without an ID
/Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/relation/finder_methods.rb:310:in find_with_ids' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/relation/finder_methods.rb:107:infind'
/Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/querying.rb:5:in __send__' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/querying.rb:5:infind'
/Users/losingle/Documents/workspace/rails/sns/db/migrate/20120618145225_object_channels_to_actions.social_stream_base_engine.rb:15:in up' /Users/losingle/Documents/workspace/rails/sns/db/migrate/20120618145225_object_channels_to_actions.social_stream_base_engine.rb:14:ineach'
/Users/losingle/Documents/workspace/rails/sns/db/migrate/20120618145225_object_channels_to_actions.social_stream_base_engine.rb:14:in up' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/migration.rb:410:insend'
/Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/migration.rb:410:in migrate' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/benchmark.rb:293:inmeasure'
/Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/migration.rb:410:in migrate' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:123:inwith_connection'
/Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/migration.rb:389:in migrate' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/migration.rb:528:insend'
/Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/migration.rb:528:in migrate' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/migration.rb:720:inmigrate'
/Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/migration.rb:775:in call' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/migration.rb:775:inddl_transaction'
/Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in transaction' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/transactions.rb:208:intransaction'
/Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/migration.rb:775:in ddl_transaction' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/migration.rb:719:inmigrate'
/Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/migration.rb:700:in each' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/migration.rb:700:inmigrate'
/Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/migration.rb:570:in up' /Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/migration.rb:551:inmigrate'
/Library/Ruby/Gems/1.8/gems/activerecord-3.2.6/lib/active_record/railties/databases.rake:153
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in call' /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:inexecute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in each' /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:inexecute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:158:in invoke_with_call_chain' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:insynchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in invoke_with_call_chain' /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:144:ininvoke'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:116:in invoke_task' /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:intop_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in each' /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:intop_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in standard_exception_handling' /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:88:intop_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:66:in run' /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:instandard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:63:in run' /Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/bin/rake:33 /usr/bin/rake:19:inload'
/usr/bin/rake:19
Tasks: TOP => db:migrate

Contributor

atd commented Jun 18, 2012

You can try rake db:reset

I got the new msg:
-- add_foreign_key("ties", "contacts", {:name=>"ties_on_contact_id"})
-> 0.0001s
-- add_foreign_key("ties", "relations", {:name=>"ties_on_relation_id"})
-> 0.0001s
-- add_foreign_key("users", "actors", {:name=>"users_on_actor_id"})
-> 0.0001s
== CreateSocialStream: migrated (0.0756s) ====================================

== SingletonSingleRelations: migrating =======================================
rake aborted!
An error has occurred, this and all later migrations canceled:

Can't mass-assign protected attributes: permissions

Tasks: TOP => db:migrate


The second time I try to use the db : migrate , and actually passed
I got the " events" table.
What is the problem ?

Contributor

atd commented Jun 19, 2012

See #260

@atd atd closed this Jun 19, 2012

Good night!
I'm having trouble creating social_stream, persistent rake db: reset

== RelationPublicPermissions: migrating ======================================
rake aborted!
An error has occurred, all later migrations canceled:

Can't mass-assign protected attributes: permissions
/home/roliveira/.rvm/gems/ruby-1.9.2-p318@social_stream/gems/activemodel-3.2.9/lib/active_model/mass_assignment_security/sanitizer.rb:48:in process_removed_attributes' /home/roliveira/.rvm/gems/ruby-1.9.2-p318@social_stream/gems/activemodel-3.2.9/lib/active_model/mass_assignment_security/sanitizer.rb:20:indebug_protected_attribute_removal'

Contributor

atd commented Jan 12, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment