Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rails 5 issue #2532

Closed
ValenOnish opened this issue Jan 17, 2016 · 16 comments
Closed

rails 5 issue #2532

ValenOnish opened this issue Jan 17, 2016 · 16 comments

Comments

@ValenOnish
Copy link

on macbook pro Capitan, when I added

gem 'rails_admin'

I got:

Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (< 5.1, >= 5.0.0.beta1)

rails_admin (~> 0.8.1) was resolved to 0.8.1, which depends on
  rails (~> 4.0)
@asingla
Copy link

asingla commented Jan 27, 2016

I am facing the same issue. Any updates on this?

@asingla
Copy link

asingla commented Jan 27, 2016

Is it fine to use git: https://github.com/sferik/rails_admin.git? Do you recommend downgrading to rails 4.2?

@hmistry
Copy link

hmistry commented Feb 4, 2016

Faced same issue, then tried against master branch but bundler failed to resolve dependencies. Looks like Rails 5.0.0.beta2 uses Rack 2.0.0.alpha, but rails_admin requires a Rack 1.3.x version.

Bundler could not find compatible versions for gem "rack":
  In snapshot (Gemfile.lock):
    rack (= 2.0.0.alpha)

  In Gemfile:
    haml-rails was resolved to 0.9.0, which depends on
      actionpack (>= 4.0.1) was resolved to 5.0.0.beta2, which depends on
        rack (~> 2.x)

    better_errors was resolved to 2.1.1, which depends on
      rack (>= 0.9.0)

    capybara was resolved to 2.6.2, which depends on
      rack (>= 1.0.0)

    rails_admin was resolved to 0.8.1, which depends on
      rack-pjax (~> 0.7) was resolved to 0.7.0, which depends on
        rack (~> 1.3)

    haml-rails was resolved to 0.9.0, which depends on
      actionpack (>= 4.0.1) was resolved to 5.0.0.beta2, which depends on
        rack-test (~> 0.6.3) was resolved to 0.6.3, which depends on
          rack (>= 1.0)

    haml-rails was resolved to 0.9.0, which depends on
      actionpack (>= 4.0.1) was resolved to 5.0.0.beta2, which depends on
        rack-test (~> 0.6.3) was resolved to 0.6.3, which depends on
          rack (>= 1.0)

    sass-rails (~> 5.0) was resolved to 5.0.4, which depends on
      sprockets (< 4.0, >= 2.8) was resolved to 3.5.2, which depends on
        rack (< 3, > 1)

@hmistry
Copy link

hmistry commented Feb 4, 2016

Adding this version of rack-ajax in Gemfile solved the gem resolution but installation still fails. (They loosened the rack requirement.)

gem 'rack-pjax', github: 'afcapel/rack-pjax', branch: 'master'

Any ideas to fix this?

rails g rails_admin:install
/Users/hm/.rvm/gems/ruby-2.3.0@global/gems/actionpack-5.0.0.beta2/lib/action_dispatch/middleware/stack.rb:108:in `assert_index': No such middleware to insert after: ActionDispatch::ParamsParser (RuntimeError)
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/actionpack-5.0.0.beta2/lib/action_dispatch/middleware/stack.rb:80:in `insert_after'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/railties-5.0.0.beta2/lib/rails/configuration.rb:69:in `block in merge_into'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/railties-5.0.0.beta2/lib/rails/configuration.rb:68:in `each'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/railties-5.0.0.beta2/lib/rails/configuration.rb:68:in `merge_into'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/railties-5.0.0.beta2/lib/rails/engine.rb:507:in `block in app'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/railties-5.0.0.beta2/lib/rails/engine.rb:504:in `synchronize'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/railties-5.0.0.beta2/lib/rails/engine.rb:504:in `app'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/railties-5.0.0.beta2/lib/rails/application/finisher.rb:34:in `block in <module:Finisher>'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/railties-5.0.0.beta2/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/railties-5.0.0.beta2/lib/rails/initializable.rb:30:in `run'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/railties-5.0.0.beta2/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/hm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
    from /Users/hm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
    from /Users/hm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
    from /Users/hm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
    from /Users/hm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each'
    from /Users/hm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `call'
    from /Users/hm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
    from /Users/hm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
    from /Users/hm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/railties-5.0.0.beta2/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/railties-5.0.0.beta2/lib/rails/application.rb:350:in `initialize!'
    from /Users/hm/Documents/Loop/Server/Rails Projects/dummy2/config/environment.rb:5:in `<top (required)>'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/activesupport-5.0.0.beta2/lib/active_support/dependencies.rb:302:in `require'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/activesupport-5.0.0.beta2/lib/active_support/dependencies.rb:302:in `block in require'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/activesupport-5.0.0.beta2/lib/active_support/dependencies.rb:268:in `load_dependency'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/activesupport-5.0.0.beta2/lib/active_support/dependencies.rb:302:in `require'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/spring-1.6.2/lib/spring/application.rb:92:in `preload'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/spring-1.6.2/lib/spring/application.rb:143:in `serve'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/spring-1.6.2/lib/spring/application.rb:131:in `block in run'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/spring-1.6.2/lib/spring/application.rb:125:in `loop'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/spring-1.6.2/lib/spring/application.rb:125:in `run'
    from /Users/hm/.rvm/gems/ruby-2.3.0@global/gems/spring-1.6.2/lib/spring/application/boot.rb:18:in `<top (required)>'
    from /Users/hm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/hm/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from -e:1:in `<main>'

@bbenezech
Copy link
Collaborator

@hmistry Can you try a rake middlewares and see if the ActionDispatch::ParamsParser still shows up?
Do you have any reference on that middleware in your code?
This does not look like it's coming from RailsAdmin.

Can you investigate?

@hmistry
Copy link

hmistry commented Feb 4, 2016

@bbenezech Tried rake middleware and rails middleware (Rails 5 is wrapping rake cmd). Both give me same failures as above.

I can help investigate if you can point me to possible suspect areas and what you expect it to do in a working situation. I have very limited time to spare due to deadlines right now. I too suspect the problem is more in your gem dependency which is lightly maintained, and actionpack.

@bbenezech
Copy link
Collaborator

Can you grep ParamsParser in your project?

@hmistry
Copy link

hmistry commented Feb 4, 2016

There's no ParamParser. What are you thinking/looking for?

If it is created from rails_admin install, then its probably not there because rails g rails_admin:install did not work at all.

@bbenezech
Copy link
Collaborator

No such middleware to insert after: ActionDispatch::ParamsParser
Someone is trying to insert a middleware after ActionDispatch::ParamsParser

Afaik, it is not rails_admin. It could be one of your depencencies, or one of rails_admin dependencies, but the stack trace is unclear.

@eshaiju
Copy link

eshaiju commented Feb 11, 2016

I also have same issue..

rails g rails_admin:install
/home/shaiju/.rvm/gems/ruby-2.3.0/gems/actionpack-5.0.0.beta2/lib/action_dispatch/middleware/stack.rb:108:in `assert_index': No such middleware to insert after: ActionDispatch::ParamsParser (RuntimeError)
    from /home/shaiju/.rvm/gems/ruby-2.3.0/gems/actionpack-5.0.0.beta2/lib/action_dispatch/middleware/stack.rb:80:in `insert_after'
    from /home/shaiju/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.beta2/lib/rails/configuration.rb:69:in `block in merge_into'
    from /home/shaiju/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.beta2/lib/rails/configuration.rb:68:in `each'
    from /home/shaiju/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.beta2/lib/rails/configuration.rb:68:in `merge_into'
    from /home/shaiju/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.beta2/lib/rails/engine.rb:507:in `block in app'
    from /home/shaiju/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.beta2/lib/rails/engine.rb:504:in `synchronize'
    from /home/shaiju/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.beta2/lib/rails/engine.rb:504:in `app'
    from /home/shaiju/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.beta2/lib/rails/application/finisher.rb:34:in `block in <module:Finisher>'
    from /home/shaiju/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.beta2/lib/rails/initializable.rb:30:in `instance_exec'
    from /home/shaiju/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.beta2/lib/rails/initializable.rb:30:in `run'
    from /home/shaiju/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.beta2/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /home/shaiju/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
    from /home/shaiju/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
    from /home/shaiju/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
    from /home/shaiju/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
    from /home/shaiju/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each'
    from /home/shaiju/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `call'
    from /home/shaiju/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
    from /home/shaiju/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
    from /home/shaiju/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
    from /home/shaiju/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.beta2/lib/rails/initializable.rb:54:in `run_initializers'
    from /home/shaiju/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.beta2/lib/rails/application.rb:350:in `initialize!'

@bbenezech
Copy link
Collaborator

@eshaiju Can you find the culprit? I don't have any app on rails 5 atm.

@mshibuya
Copy link
Member

@eshaiju This is caused by remotipart's Rails5 incompatibility.
Using my fork solves middleware problem, but it needs some more work to be fully functional(ajax file upload does not work now).

@bbenezech
Copy link
Collaborator

@sandric
Copy link

sandric commented Apr 4, 2016

I have an issue like that. Is it bad idea to bump dependency in master to kaminari's master branch? Is there a way to fix somehow by now without that?

@webzorg
Copy link

webzorg commented Jun 2, 2016

this solved it. include all 3 Gem lines that the post tells you to include. http://blog.endpoint.com/2016/05/gem-dependency-issues-with-rails-5-beta.html

@mshibuya
Copy link
Member

mshibuya commented Sep 3, 2016

Current master is Rails 5 ready.

@mshibuya mshibuya closed this as completed Sep 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants