Closed scyros closed 9 years ago
Mmmm, you're right. I'll do it. Just give me a couple of days please.
I opened https://github.com/calonso/rails-push-notifications/tree/rails4 branch to add rails 4 support. Can you please switch to this branch and let me know if works as expected?
@calonso
I tried the new branch and no migrations were created.
iMac-de-Admin01:solid-finger carlosleon$ rails generate ror_push_notifications:migrations
WARNING: Could not find "create_rpn_configs.rb" in any of your source paths. Your current source paths are:
/Users/carlosleon/.rvm/gems/ruby-2.2.0/bundler/gems/ror-push-notifications-7c475f6e5569/lib/generators/ror_push_notifications/templates/migrations
WARNING: Could not find "create_rpn_devices.rb" in any of your source paths. Your current source paths are:
/Users/carlosleon/.rvm/gems/ruby-2.2.0/bundler/gems/ror-push-notifications-7c475f6e5569/lib/generators/ror_push_notifications/templates/migrations
WARNING: Could not find "create_rpn_notifications.rb" in any of your source paths. Your current source paths are:
/Users/carlosleon/.rvm/gems/ruby-2.2.0/bundler/gems/ror-push-notifications-7c475f6e5569/lib/generators/ror_push_notifications/templates/migrations
Ok, I fixed that one as well. Could you please try again?
Now i have:
iMac-de-Admin01:solid-finger carlosleon$ rails generate ror_push_notifications:migrations
create db/migrate/20150220133825_create_rpn_configs.rb
create db/migrate/20150220133825_create_rpn_devices.rb
create db/migrate/20150220133825_create_rpn_notifications.rb
iMac-de-Admin01:solid-finger carlosleon$ rake db:migrate
rake aborted!
ActiveRecord::DuplicateMigrationVersionError:
Multiple migrations have the version number 20150220133825
/Users/carlosleon/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.7/lib/active_record/migration.rb:1013:in `validate'
/Users/carlosleon/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.7/lib/active_record/migration.rb:916:in `initialize'
/Users/carlosleon/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.7/lib/active_record/migration.rb:807:in `new'
/Users/carlosleon/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.7/lib/active_record/migration.rb:807:in `up'
/Users/carlosleon/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.7/lib/active_record/migration.rb:785:in `migrate'
/Users/carlosleon/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.7/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
Ok, can you delete the generated files at db/migrate and rerun again? Should be fixed now.
The same results:
iMac-de-Admin01:solid-finger carlosleon$ rails generate ror_push_notifications:migrations
create db/migrate/20150220140233_create_rpn_configs.rb
create db/migrate/20150220140233_create_rpn_devices.rb
create db/migrate/20150220140233_create_rpn_notifications.rb
iMac-de-Admin01:solid-finger carlosleon$ rake db:migrate
rake aborted!
ActiveRecord::DuplicateMigrationVersionError:
Multiple migrations have the version number 20150220140233
/Users/carlosleon/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.7/lib/active_record/migration.rb:1013:in `validate'
/Users/carlosleon/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.7/lib/active_record/migration.rb:916:in `initialize'
/Users/carlosleon/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.7/lib/active_record/migration.rb:807:in `new'
/Users/carlosleon/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.7/lib/active_record/migration.rb:807:in `up'
/Users/carlosleon/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.7/lib/active_record/migration.rb:785:in `migrate'
/Users/carlosleon/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.7/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
iMac-de-Admin01:solid-finger carlosleon$ rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
rake aborted!
ActiveRecord::DuplicateMigrationVersionError:
Multiple migrations have the version number 20150220140233
/Users/carlosleon/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.7/lib/active_record/migration.rb:1013:in `validate'
/Users/carlosleon/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.7/lib/active_record/migration.rb:916:in `initialize'
/Users/carlosleon/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.7/lib/active_record/migration.rb:807:in `new'
/Users/carlosleon/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.7/lib/active_record/migration.rb:807:in `up'
/Users/carlosleon/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.7/lib/active_record/migration.rb:785:in `migrate'
/Users/carlosleon/.rvm/gems/ruby-2.2.0/gems/activerecord-4.1.7/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>'
/Users/carlosleon/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/task.rb:240:in `call'
/Users/carlosleon/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/task.rb:240:in `block in execute'
/Users/carlosleon/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/task.rb:235:in `each'
/Users/carlosleon/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/task.rb:235:in `execute'
/Users/carlosleon/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/carlosleon/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/Users/carlosleon/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/task.rb:172:in `invoke_with_call_chain'
/Users/carlosleon/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/task.rb:165:in `invoke'
/Users/carlosleon/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/application.rb:150:in `invoke_task'
/Users/carlosleon/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/carlosleon/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/application.rb:106:in `each'
/Users/carlosleon/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/application.rb:106:in `block in top_level'
/Users/carlosleon/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/application.rb:115:in `run_with_threads'
/Users/carlosleon/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/application.rb:100:in `top_level'
/Users/carlosleon/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/application.rb:78:in `block in run'
/Users/carlosleon/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'
/Users/carlosleon/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rake/application.rb:75:in `run'
/Users/carlosleon/.rvm/rubies/ruby-2.2.0/bin/rake:33:in `<main>'
Tasks: TOP => db:migrate
Sounds weird...Did you updated the branch?
bundle update rails-push-notifications
Works!
Thank you!
Do you think to provide rails 4 support for this gem?
Recently i tried to include your gem in a project and i got the following trace error when i run