jashmenn / activeuuid

Binary uuid keys in Rails
MIT License
340 stars 124 forks source link

Rails 5 issues #80

Open spdawson opened 8 years ago

spdawson commented 8 years ago

In a clean Rails 5.0.0.beta3 project, adding

gem 'activeuuid', '>= 0.5.0'

to the Gemfile causes the following failure to start the Rails server.

DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from require at /var/lib/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:77)
/var/lib/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'activeuuid'. (Bundler::GemRequireError)
    from /var/lib/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
    from /var/lib/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
    from /var/lib/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
    from /var/lib/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
    from /var/lib/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
    from /var/lib/gems/2.3.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
    from /home/simon/Projects/rails5-activeuuid-test/config/application.rb:7:in `<top (required)>'
    from /home/simon/.bundler/gems/railties-5.0.0.beta3/lib/rails/commands/commands_tasks.rb:88:in `require'
    from /home/simon/.bundler/gems/railties-5.0.0.beta3/lib/rails/commands/commands_tasks.rb:88:in `block in server'
    from /home/simon/.bundler/gems/railties-5.0.0.beta3/lib/rails/commands/commands_tasks.rb:85:in `tap'
    from /home/simon/.bundler/gems/railties-5.0.0.beta3/lib/rails/commands/commands_tasks.rb:85:in `server'
    from /home/simon/.bundler/gems/railties-5.0.0.beta3/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
    from /home/simon/.bundler/gems/railties-5.0.0.beta3/lib/rails/command.rb:20:in `run'
    from /home/simon/.bundler/gems/railties-5.0.0.beta3/lib/rails/commands.rb:18:in `<top (required)>'
    from /home/simon/Projects/rails5-activeuuid-test/bin/rails:9:in `require'
    from /home/simon/Projects/rails5-activeuuid-test/bin/rails:9:in `<top (required)>'
    from /home/simon/.bundler/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `load'
    from /home/simon/.bundler/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `call'
    from /home/simon/.bundler/gems/spring-1.6.4/lib/spring/client/command.rb:7:in `call'
    from /home/simon/.bundler/gems/spring-1.6.4/lib/spring/client.rb:28:in `run'
    from /home/simon/.bundler/gems/spring-1.6.4/bin/spring:49:in `<top (required)>'
    from /home/simon/.bundler/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `load'
    from /home/simon/.bundler/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `<top (required)>'
    from /home/simon/Projects/rails5-activeuuid-test/bin/spring:13:in `require'
    from /home/simon/Projects/rails5-activeuuid-test/bin/spring:13:in `<top (required)>'
    from bin/rails:3:in `load'
    from bin/rails:3:in `<main>'
Judahmeek commented 8 years ago

Still an issue. @blackham's patch in #76 may fix this.

tom-lord commented 7 years ago

Rails 5 has built-in support for UUID primary keys, so ideally you should migrate away from this gem...

DuBistKomisch commented 7 years ago

@tom-lord got a link on this? best I can find is https://stackoverflow.com/a/42950049 which seems to work

leifcr commented 6 years ago

For mysql: this gem works fine: https://github.com/nedap/mysql-binuuid-rails

hardreggaecafe commented 5 years ago

I deleted activeuuid in Rails 5.0.2. And it works.