Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 4.1.0.beta1 upgrade fails

I recently tried to install rails 4.1.0.beta1, but rails s results in the following error.

[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/core_ext/module/aliasing.rb:32:in `alias_method': undefined method `graft' for class `ActiveRecord::Associations::JoinDependency' (NameError)
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/core_ext/module/aliasing.rb:32:in `alias_method_chain'
[RVM]/gems/ruby-2.0.0-p247/gems/polyamorous-0.6.4/lib/polyamorous/join_dependency.rb:7:in `block in included'
[RVM]/gems/ruby-2.0.0-p247/gems/polyamorous-0.6.4/lib/polyamorous/join_dependency.rb:5:in `class_eval'
[RVM]/gems/ruby-2.0.0-p247/gems/polyamorous-0.6.4/lib/polyamorous/join_dependency.rb:5:in `included'
[RVM]/gems/ruby-2.0.0-p247/gems/polyamorous-0.6.4/lib/polyamorous.rb:20:in `include'
[RVM]/gems/ruby-2.0.0-p247/gems/polyamorous-0.6.4/lib/polyamorous.rb:20:in `<top (required)>'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `require'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `block in require'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:232:in `load_dependency'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `require'
[RVM]/gems/ruby-2.0.0-p247/gems/ransack-1.1.0/lib/ransack/adapters/active_record/3.1/context.rb:3:in `<top (required)>'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `require'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `block in require'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:232:in `load_dependency'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `require'
[RVM]/gems/ruby-2.0.0-p247/gems/ransack-1.1.0/lib/ransack/adapters/active_record/3.2/context.rb:2:in `<top (required)>'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `require'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `block in require'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:232:in `load_dependency'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `require'
[RVM]/gems/ruby-2.0.0-p247/gems/ransack-1.1.0/lib/ransack/adapters/active_record/context.rb:2:in `<top (required)>'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `require'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `block in require'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:232:in `load_dependency'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `require'
[RVM]/gems/ruby-2.0.0-p247/gems/ransack-1.1.0/lib/ransack/adapters/active_record.rb:12:in `<top (required)>'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `require'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `block in require'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:232:in `load_dependency'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `require'
[RVM]/gems/ruby-2.0.0-p247/gems/ransack-1.1.0/lib/ransack.rb:22:in `<top (required)>'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `require'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `block in require'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:232:in `load_dependency'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `require'
[RVM]/gems/ruby-2.0.0-p247/bundler/gems/active_admin-85b9f8164809/lib/active_admin.rb:2:in `<top (required)>'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `require'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `block in require'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:232:in `load_dependency'
[RVM]/gems/ruby-2.0.0-p247/gems/activesupport-4.1.0.beta1/lib/active_support/dependencies.rb:247:in `require'
[RVM]/gems/ruby-2.0.0-p247/bundler/gems/active_admin-85b9f8164809/lib/activeadmin.rb:1:in `<top (required)>'
[RVM]/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
[RVM]/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
[RVM]/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
[RVM]/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
[RVM]/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
[RVM]/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
[RVM]/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
[RAILS_ROOT}/config/application.rb:8:in `<top (required)>'
[RVM]/gems/ruby-2.0.0-p247/gems/railties-4.1.0.beta1/lib/rails/commands/commands_tasks.rb:79:in `require'
[RVM]/gems/ruby-2.0.0-p247/gems/railties-4.1.0.beta1/lib/rails/commands/commands_tasks.rb:79:in `block in server'
[RVM]/gems/ruby-2.0.0-p247/gems/railties-4.1.0.beta1/lib/rails/commands/commands_tasks.rb:76:in `tap'
[RVM]/gems/ruby-2.0.0-p247/gems/railties-4.1.0.beta1/lib/rails/commands/commands_tasks.rb:76:in `server'
[RVM]/gems/ruby-2.0.0-p247/gems/railties-4.1.0.beta1/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
[RVM]/gems/ruby-2.0.0-p247/gems/railties-4.1.0.beta1/lib/rails/commands.rb:17:in `<top (required)>'

This is my current system.

  • ruby 2.0.0
  • rails 4.1.0.beta1

Why is it failing?

like image 613
Linus Oleander Avatar asked Dec 18 '13 02:12

Linus Oleander


1 Answers

It's failing because of Ransack dependency's Polyamorous.

Here's an open issue in activerecord-hackery/polyamorous to keep an eye on https://github.com/activerecord-hackery/polyamorous/issues/6

UPDATE

To get it work with 4.1, put this in your Gemfile

gem 'formtastic', github: 'justinfrench/formtastic'
gem 'ransack', github: 'activerecord-hackery/ransack', branch: 'rails-4.1'
gem 'polyamorous', github: 'activerecord-hackery/polyamorous'
gem 'activeadmin', github: 'gregbell/active_admin'
like image 146
amrnt Avatar answered Oct 04 '22 20:10

amrnt