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 4.0.0 #49

Closed
aminhotob opened this issue Jul 29, 2013 · 58 comments
Closed

Rails 4.0.0 #49

aminhotob opened this issue Jul 29, 2013 · 58 comments

Comments

@aminhotob
Copy link

get this errors with rails 4.0.0 and mongoid 4.0.0

gem 'activeadmin-mongoid',  git: 'git://github.com/elia/activeadmin-mongoid.git'
Bundler could not find compatible versions for gem "sass-rails":
  In Gemfile:
    activeadmin-mongoid (>= 0) ruby depends on
      sass-rails (>= 3.1.4, ~> 3.1) ruby
    sass-rails (4.0.0)
@elia
Copy link
Member

elia commented Jul 29, 2013

Yes, i need to try it on the 4 series and issue a new release

@elia
Copy link
Member

elia commented Jul 30, 2013

Now should be ok in master

@aminhotob
Copy link
Author

no, now get this message

Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
rails (= 4.0.0) ruby depends on
activerecord (= 4.0.0) ruby

activeadmin-mongoid (>= 0) ruby depends on
  activerecord (3.1.12)

@elia
Copy link
Member

elia commented Jul 30, 2013

Oh snap! Fixing

@elia
Copy link
Member

elia commented Jul 30, 2013

Wait, I think the problem is with AA itself, try getting the version from master and check if it's compatible with Rails 4

@aminhotob
Copy link
Author

yes @elia I removed activeadmin-mongoid and get activeadmin only it has this problem even rails4 branch, thanks

@DanielePalombo
Copy link

hi , when i try bundle install this fail with error:

Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
activeadmin-mongoid (>= 0) ruby depends on
actionpack (~> 3.1.0.alpha) ruby

rails (= 4.0.0) ruby depends on
  actionpack (4.0.0)

@elia
Copy link
Member

elia commented Aug 9, 2013

You must get activeadmin from the git rails4 branch as follows:

#  (in your Gemfile)
gem 'activeadmin', github: 'gregbell/activeadmin', branch: 'rails4'

@DanielePalombo
Copy link

Same error:

Updating git://github.com/elia/activeadmin-mongoid.git
Updating git://github.com/gregbell/active_admin.git
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
activeadmin-mongoid (>= 0) ruby depends on
activerecord (~> 3.1.0.alpha) ruby

rails (= 4.0.0) ruby depends on
  activerecord (4.0.0)

My Gemfile :

gem 'activeadmin-mongoid', git: 'git://github.com/elia/activeadmin-mongoid.git'
gem 'activeadmin', github: 'gregbell/active_admin', branch: 'rails4'
gem 'mongoid', git: 'https://github.com/mongoid/mongoid.git'

Why ?

@DanielePalombo
Copy link

Solved

I have replace

gem 'activeadmin-mongoid', git: 'git://github.com/elia/activeadmin-mongoid.git

with

gem 'activeadmin-mongoid', git: 'https://github.com/iAmeen/activeadmin-mongoid.git'

Now work

@elia
Copy link
Member

elia commented Aug 9, 2013

@DanielePalombo I checked @iameen's fork and applied his changes to master. It should be fine now.

@elia elia closed this as completed Aug 9, 2013
@grantgould
Copy link

Bundler could not find compatible versions for gem "actionpack":

In Gemfile:

activeadmin-mongoid (>= 0) ruby depends on
  actionpack (~> 3.0.0.rc2) ruby

rails (= 4.0.0) ruby depends on
  actionpack (4.0.0)

@elia elia reopened this Aug 14, 2013
@elia
Copy link
Member

elia commented Aug 14, 2013

I tried locally and seems to be good, maybe you need to bundle update activeadmin-mongoid, also be sure to use the git master version. Follows my example Gemfile:

source 'https://rubygems.org'

gem 'rails', '4.0.0'
gem 'mongoid', github: 'mongoid'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

@elia elia closed this as completed Aug 14, 2013
@DanielePalombo
Copy link

hi
when i go to AdminUser list i receive this error:

undefined methodransack' for AdminUser:Class`

@elia
Copy link
Member

elia commented Aug 16, 2013

oh snap!

I'll include specific tests for rails 4 + activeadmin@master, adding the
following method to AdminUser should work:

def ransack *args
  scoped
end

@DanielePalombo
Copy link

work with :

def self.ransack *args
  scoped
end

but now i receive :

undefined method `result' for #<Mongoid::Criteria…

@DanielePalombo
Copy link

Solved!

DanielePalombo@178b814

@jarinudom
Copy link

The gemspec still depends on jquery-rails < 3.0, but the rails4 branch of activeadmin uses the following, so there's a bundler conflict:

  s.add_dependency "jquery-rails",        ">= 3.0.0"
  s.add_dependency "jquery-ui-rails",     ">= 4.0.0"

elia pushed a commit that referenced this issue Aug 22, 2013
elia added a commit that referenced this issue Aug 22, 2013
@elia
Copy link
Member

elia commented Aug 22, 2013

@DanielePalombo @jarinudom can you confirm that master works fine?

@DanielePalombo
Copy link

i tested and when run rails s i receive this error:

/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require': cannot load such file -- meta_search/method (LoadError)

caused by lib/meta_search/searches/mongoid.rb:2

@timfjord
Copy link

I also have same issue. It because meta_search is no longer in gem dependencies.
I added meta_search above activeadmin-mongoid in Gemfile and it works

@jarinudom
Copy link

Should we maybe start looking at switching to Ransack? It's the Rails 3+ successor to meta_search.

@DanielePalombo
Copy link

Not exists ransack for mongoid ?!?!?!

@jarinudom
Copy link

Oh shoot, you are right. Never mind.

@DanielePalombo
Copy link

Many days ago i tried integrate ransack-mongoid without succes . exist
other porting of ransack for mongoid?

@grantgould
Copy link

Bundler could not find compatible versions for gem "actionpack":
In Gemfile:

activeadmin-mongoid (>= 0) ruby depends on
  actionpack (~> 3.0.0.rc2) ruby

rails (~> 4.0.0) ruby depends on
  actionpack (4.0.0)

Gemfile:

  source 'https://rubygems.org'

  gem 'rails', '~> 4.0.0'

  gem 'sass-rails', '~> 4.0.0'

  gem 'uglifier', '>= 1.3.0'

  gem 'coffee-rails', '~> 4.0.0'

  gem 'jquery-rails'


  gem 'turbolinks'

  gem 'jbuilder', '~> 1.2'

  group :doc do
    # bundle exec rake doc:rails generates the API under doc/api.
    gem 'sdoc', require: false 
  end

  gem "devise" #, :git => 'git://github.com/plataformatec/devise.git'

  #Omniauth Providers
  gem "omniauth-twitter"
  gem "omniauth-facebook"
  gem "omniauth-linkedin"


  #Koala for Facebook Graph API
  gem "koala"

  #Twitter API
  gem "twitter"

  #Linkedin API
  gem "linkedin"

  gem "therubyracer"
  gem "less-rails"


  gem 'mongoid', github: 'mongoid/mongoid', branch: 'master'

  gem 'activeadmin-mongoid', github: 'elia/activeadmin-mongoid', branch: 'rails4'

  gem 'rack-mini-profiler'

  gem 'less-rails-bootstrap'

  #Auth
  gem "cancan"

  #Payment Gateway
  gem "stripe"
  gem "bson_ext"

@elia
Copy link
Member

elia commented Oct 17, 2013

Ok, I'm going to force rails 4 and mongoid 4 in the gemspec, this will hopefully sort out all version issues

elia added a commit that referenced this issue Oct 17, 2013
@zlatio
Copy link

zlatio commented Oct 20, 2013

I get the following:

Bundler could not find compatible versions for gem "rails":
  In Gemfile:
    activeadmin-mongoid (>= 0) ruby depends on
      rails (< 4, >= 3.0.0) ruby

    rails (4.0.0)

In my Gemfile:

gem 'activeadmin-mongoid', github: 'elia/activeadmin-mongoid', branch: 'rails4'

@elia
Copy link
Member

elia commented Oct 20, 2013

@zlatio try with bundle update rails activeadmin activeadmin-mongoid mongoid

and make sure your gemfile also includes the following:

gem 'rails', '~> 4.0'
gem 'activeadmin',         github: 'gregbell/active_admin'
gem 'activeadmin-mongoid', github: 'elia/activeadmin-mongoid', branch: 'rails4'
gem 'mongoid',             github: 'mongoid/mongoid'

@zlatio
Copy link

zlatio commented Oct 21, 2013

Thanks bundle install succeed, but now I get

cannot load such file -- active_admin/comments/namespace_helper

I commented out everything in

active_admin/mongoid/comments.rb

Seems to work now but I'll make additional tests

@elia
Copy link
Member

elia commented Oct 21, 2013

@zlatio good! The rails4 branch is quite experimental (considering it uses unreleased versions of both activeadmin and mongoid). Any feedback/fix/tip/pull-request are really appreciated! :)

@i5okie
Copy link

i5okie commented Jan 14, 2014

gemfile: https://github.com/i5okie/redress/blob/development/Gemfile

Bundler could not find compatible versions for gem "jquery-rails":
In Gemfile:
activeadmin-mongoid (>= 0) ruby depends on
jquery-rails (< 3.0) ruby

jquery-rails (3.0.4)

Bundler could not find compatible versions for gem "mongoid":
In Gemfile:
activeadmin-mongoid (>= 0) ruby depends on
mongoid (~> 2.0) ruby

mongoid (4.0.0.alpha1)

@elia
Copy link
Member

elia commented Jan 14, 2014

can you retry and paste the output after installing bundler's prerelease version?

gem install bundler --pre

@i5okie
Copy link

i5okie commented Jan 14, 2014

same output...

Bundler could not find compatible versions for gem "jquery-rails":
  In Gemfile:
    activeadmin-mongoid (>= 0) ruby depends on
      jquery-rails (< 3.0) ruby

    jquery-rails (3.0.4)

Bundler could not find compatible versions for gem "mongoid":
  In Gemfile:
    activeadmin-mongoid (>= 0) ruby depends on
      mongoid (~> 2.0) ruby

    mongoid (4.0.0.alpha1)

@i5okie
Copy link

i5okie commented Jan 14, 2014

I changed gem file to include this instead:

gem 'activeadmin-mongoid', github: 'elia/activeadmin-mongoid', branch: 'rails4'

output:

Bundler could not find compatible versions for gem "mongoid":
  In Gemfile:
    activeadmin-mongoid (>= 0) ruby depends on
      mongoid (~> 4.0) ruby

    mongoid (4.0.0.alpha1)

@i5okie
Copy link

i5okie commented Jan 14, 2014

i tried changing my gemfile to:

gem 'mongoid', '~> 4', github: 'mongoid/mongoid'

and it doesnt work..

try this:

 gem 'mongoid', git: "https://github.com/mongoid/mongoid"

@elia
Copy link
Member

elia commented Jan 15, 2014

try this:

gem 'mongoid', '4.0.0.alpha1', github: 'mongoid'

(I'm just guessing though)

@h4rrison-james
Copy link

I have this in Gemfile:

gem 'mongoid', :github => "mongoid/mongoid"
gem 'activeadmin-mongoid', github: 'elia/activeadmin-mongoid', branch: 'rails4'
gem 'activeadmin', github: 'gregbell/active_admin'

And I'm getting:

Could not find gem 'activeadmin (~> 0.6.1) ruby', which is required by gem
'activeadmin-mongoid (>= 0) ruby', in any of the sources.

@elia
Copy link
Member

elia commented Mar 10, 2014

@h4rrison-james can you retry and paste the output after installing bundler's prerelease version?

gem install bundler --pre

@elia elia mentioned this issue Mar 21, 2014
@iduuck
Copy link

iduuck commented Mar 21, 2014

# Database
gem 'mongoid', git: 'https://github.com/mongoid/mongoid.git'
gem 'mongoid_slug'
[...]
# Administration
gem 'activeadmin-mongoid', github: 'elia/activeadmin-mongoid', branch: 'rails4'
$ bundle
Updating git://github.com/elia/activeadmin-mongoid.git
Fetching gem metadata from https://rubygems.org/.........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "mongoid":
  In Gemfile:
    activeadmin-mongoid (>= 0) ruby depends on
      mongoid (~> 4.0) ruby

    mongoid (4.0.0.beta1)

This is the output with the prerelease of bundler

@iduuck
Copy link

iduuck commented Mar 21, 2014

Deleting Gemfile.lock and then bundle did the trick. Thank you!

@mzubala
Copy link

mzubala commented Apr 8, 2014

Bundler could not find compatible versions for gem "mongoid":
  In Gemfile:
    activeadmin-mongoid (>= 0) ruby depends on
      mongoid (~> 4.0) ruby

    mongoid (4.0.0.beta1)

I'm getting the same error as iDuuck. Deleting Gemfile.lock doesn't help. Any ideas how to fix it?

@elia
Copy link
Member

elia commented Apr 8, 2014

@mzubala be sure to update bundler to >= 1.6 to get meaningful errors

@mzubala
Copy link

mzubala commented Apr 8, 2014

@elia I'm using 1.6.1. This is complete output I get:

$ bundle
Updating git://github.com/mongoid/mongoid.git
Updating git://github.com/elia/activeadmin-mongoid.git
Fetching gem metadata from https://rubygems.org/.........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "mongoid":
  In Gemfile:
    activeadmin-mongoid (>= 0) ruby depends on
      mongoid (~> 4.0) ruby

    mongoid (4.0.0.beta1)

@elia
Copy link
Member

elia commented Apr 8, 2014

try updating, should be fixed by cbbffb2

@mzubala
Copy link

mzubala commented Apr 8, 2014

Now I get:

Updating git://github.com/mongoid/mongoid.git
Updating git://github.com/elia/activeadmin-mongoid.git
Fetching gem metadata from https://rubygems.org/.........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "mongoid":
  In Gemfile:
    activeadmin-mongoid (>= 0) ruby depends on
      mongoid (< 5, >= 4.0) ruby

    mongoid (4.0.0.beta1)

@mzubala
Copy link

mzubala commented Apr 8, 2014

I've managed to get it working by:

  1. forking your project
  2. adding some changes to activeadmin-mongoid.gemspec
  3. explicitly adding to my Gemfile:
gem 'activeadmin', github: 'gregbell/active_admin'

unfortunately filters are not working so I also had to do

ActiveAdmin.register AdminUser do
  permit_params :email, :password, :password_confirmation

  config.filters = false

end

@elia is there any way to make filters work?

@elia
Copy link
Member

elia commented Apr 8, 2014

not, sure, never been a filter user myself in mongoid land, so I don't know

mzubala/activeadmin-mongoid@2f6991a...6dd0548

I see the changes, I'll fix the dep on mongoid and make it point right to beta1, also I can remove the version on activeadmin

@elia
Copy link
Member

elia commented Apr 8, 2014

9b18584

@mzubala can you give it a try?

@mzubala
Copy link

mzubala commented Apr 8, 2014

Updating git://github.com/elia/activeadmin-mongoid.git
Fetching gem metadata from https://rubygems.org/.........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "rails":
  In Gemfile:
    activeadmin-mongoid (>= 0) ruby depends on
      activeadmin (< 2, >= 0.6.1) ruby depends on
        rails (< 4, >= 3.0.0) ruby

    rails (4.0.2)

Looks like it tries to grab some rails 3 active admin version any way. I'm not sure how to force it to grab the latest github version of activeadmin. If you remove the version of activeadmin completely it also tries to get some previous release. Only removing activeadmin dependency and adding it to my Gemfile worked for me so far but probably there is some more elegant way.

@elia
Copy link
Member

elia commented Apr 8, 2014

I suggest to add back:

gem 'activeadmin', github: 'gregbell/active_admin'

and eventually I'll add a note on the readme

fred pushed a commit to fred/activeadmin-mongoid that referenced this issue Apr 11, 2014
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