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

Problems with dependency of the new and old jquery-rails and jquery-ui-rails #54

Closed
pencilcheck opened this issue Sep 25, 2013 · 11 comments

Comments

@pencilcheck
Copy link
Contributor

activeadmin 0.6 depends on jquery-rails > 1.0.0 because at that time I believe they didn't foresee the change that refactor jquery-ui out into its own gem, but ironically activeadmin-mongoid depends on activeadmin ~> 0.6 and at the same time jquery-rails >= 3.0.0 and jquery-ui-rails >= 4.0.0, so when I run rails it will keep telling me that jquery-ui file is not found because activeadmin-0.6 is still using the old syntax to include jquery-ui and I can't include two versions of jquery-rails at the same time...

This issue has been giving me a lot of headaches, because if I upgrade to activeadmin 0.6.1 then formtastics will have problem with mongoid saying that method reflections is not found for Whatever:Class and the author of formtastics explicitly stated that he is not interested in supporting mongo db as seen in this issue (formtastic/formtastic#286).

So I'm stuck between this dependency hell, and I can't get out of it. And please don't tell me to upgrade to rails 4 (using rails 3.2.13 currently).

So please have mercy and remove that jquery-rails version dependency for activeadmin-mongoid or have a version to support older jquery-rails but not too archiac thanks (the last version is 0.0.2 which is over 1 year old).

@pencilcheck
Copy link
Contributor Author

I had a workaround by giving up the new jquery and new activeadmin by reverting back to where I was - activeadmin-mongoid 0.2.0 and activeadmin 0.6.0 and jquery-rails < 3.0.0

As I overlooked that 0.2.0 didn't require the latest jquery-rails that's how I escape this cycle.

Note to self: never hit bundle update without a week of free time ahead of you.

However I still want to take this opportunity to send a message to the owner that the commit fffdcfb is a little bit non sensible and should be reverted, since activeadmin is already having its own dependencies on jquery-rails, don't do double dependencies...

@alepore
Copy link

alepore commented Oct 4, 2013

Agree, there's some confusion with gems versions and dependencies.
Try with this Gemfile:

# ...
gem 'jquery-ui-rails'
gem 'activeadmin-mongoid', github: 'elia/activeadmin-mongoid'

and this assets/javascripts/active_admin.js

//= require jquery
//= require jquery.ui.all
//= require jquery_ujs

//= require active_admin/application

@elia
Copy link
Member

elia commented Oct 5, 2013

@pencilcheck reverting the commit, rails4 support along with newer jquery-rails dep is on branch rails4 (surprisingly)

sorry for the delay 🐸

@elia elia closed this as completed in 6c6ce94 Oct 5, 2013
@elia
Copy link
Member

elia commented Oct 5, 2013

@pencilcheck what's the last known good version of formtastic?
It would probably be a good idea to lock its versions too.

@pencilcheck
Copy link
Contributor Author

I don't know. I just use whatever formtastic activeadmin 0.6 depends on as 0.6.1 has a version of formtastic with the issues I mentioned.

@renevall
Copy link

renevall commented Oct 5, 2013

Yeah im getting the same issue, @elia did you update this to one of the gems? gem 0.3.0 and 0.2.0 are giving me the same error.

Thanks

@elia
Copy link
Member

elia commented Oct 5, 2013

@ResidentBio @pencilcheck can you send me the problematic Gemfile.lock, I tried to reproduce but to no avail

@renevall
Copy link

renevall commented Oct 5, 2013

I end up forcing the Active Admin 0.6.0 by specifying the version on my gemfile. Since the code says ~>'0.6.0' I think it is chosing the 0.6.1 by default.

I even tried a gems wipe and I saw 0.6.1 been downloaded.

Here is the Gemlock at omne point

activeadmin (0.6.1)
  arbre (~> 1.0)
  bourbon (>= 1.0.0, < 4)
  devise (>= 1.5.4, < 4)
  formtastic (~> 2.0)
  inherited_resources (~> 1.3)
  jquery-rails (>= 1.0.0, < 3)
  kaminari (~> 0.13)
  meta_search (~> 1.0)
  rails (>= 3.0.0, < 4)
  sass (~> 3.1)
activeadmin-mongoid (0.2.0)
  activeadmin (~> 0.6)
  meta_search (>= 1.1.0.pre)
  mongoid (~> 3.0)
  sass-rails (~> 3.1, >= 3.1.4)

@elia
Copy link
Member

elia commented Oct 5, 2013

@ResidentBio I'm interested in the version of formtastic, can tell me the result of bundle show formtastic.

@alepore
Copy link

alepore commented Oct 6, 2013

Hope it helps, i'm fine with this Gemfile.lock https://gist.github.com/alepore/6850998

@elia
Copy link
Member

elia commented Oct 6, 2013

Thanks @alepore my plan is to add formtastic 2.2.1, activeadmin 0.6.1 and rails 3.2.x as activeadmin-mongoid explicit dependencies, that should sort out many bundling and compatibilities problems

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

4 participants