fatfreecrm / fat_free_crm

Ruby on Rails CRM platform
http://www.fatfreecrm.com
Other
3.57k stars 1.32k forks source link

Unable to setup new rails project with ffc as an engine #1040

Open AmitChotaliya opened 1 year ago

AmitChotaliya commented 1 year ago

Environment:

Ruby: 2.7.5 Rails: 6.1.7 OS: Ubuntu Bundler: 2.3.10

I have created a new rails project. Added fat-free-crm gem dependency. While running bundle install I am getting the following error.

Bundler could not find compatible versions for gem "actionpack":
  In Gemfile:
    rails (~> 6.1.7) was resolved to 6.1.7, which depends on
      actionpack (= 6.1.7)

    fat_free_crm was resolved to 0.20.1, which depends on
      responders (~> 3.0) was resolved to 3.0.1, which depends on
        actionpack (>= 5.0)

    fat_free_crm was resolved to 0.20.1, which depends on
      sprockets-rails (>= 3.0.0) was resolved to 3.4.2, which depends on
        actionpack (>= 5.2)

Bundler could not find compatible versions for gem "actionview":
  In Gemfile:
    jbuilder (~> 2.7) was resolved to 2.11.5, which depends on
      actionview (>= 5.0.0)

    rails (~> 6.1.7) was resolved to 6.1.7, which depends on
      actionview (= 6.1.7)

    web-console (>= 4.1.0) was resolved to 4.2.0, which depends on
      actionview (>= 6.0.0)

Bundler could not find compatible versions for gem "activemodel":
  In Gemfile:
    rails (~> 6.1.7) was resolved to 6.1.7, which depends on
      activemodel (= 6.1.7)

    web-console (>= 4.1.0) was resolved to 4.2.0, which depends on
      activemodel (>= 6.0.0)

Bundler could not find compatible versions for gem "activerecord":
  In Gemfile:
    fat_free_crm was resolved to 0.20.1, which depends on
      acts-as-taggable-on (>= 3.4.3) was resolved to 9.0.1, which depends on
        activerecord (< 7.1, >= 6.0)

    fat_free_crm was resolved to 0.20.1, which depends on
      paper_trail (~> 12.0.0) was resolved to 12.0.0, which depends on
        activerecord (>= 5.2)

    rails (~> 6.1.7) was resolved to 6.1.7, which depends on
      activerecord (= 6.1.7)

Bundler could not find compatible versions for gem "activesupport":
  In Gemfile:
    jbuilder (~> 2.7) was resolved to 2.11.5, which depends on
      activesupport (>= 5.0.0)

    rails (~> 6.1.7) was resolved to 6.1.7, which depends on
      activesupport (= 6.1.7)

    webpacker (~> 5.0) was resolved to 5.4.3, which depends on
      activesupport (>= 5.2)

Bundler could not find compatible versions for gem "acts_as_commentable":
  In Gemfile:
    fat_free_crm was resolved to 0.20.1, which depends on
      acts_as_commentable (~> 6.0.0)

Could not find gem 'acts_as_commentable (~> 6.0.0)', which is required by gem 'fat_free_crm', in rubygems repository
https://rubygems.org/ or installed locally.

The source contains the following gems matching 'acts_as_commentable':
  * acts_as_commentable-2.0.1
  * acts_as_commentable-2.0.2
  * acts_as_commentable-2.1.0
  * acts_as_commentable-2.1.1
  * acts_as_commentable-3.0.0
  * acts_as_commentable-3.0.1
  * acts_as_commentable-4.0.0
  * acts_as_commentable-4.0.1
  * acts_as_commentable-4.0.2
Bundler could not find compatible versions for gem "rack":
  In Gemfile:
    rails (~> 6.1.7) was resolved to 6.1.7, which depends on
      actionpack (= 6.1.7) was resolved to 6.1.7, which depends on
        rack (~> 2.0, >= 2.0.9)

    capybara (>= 3.26) was resolved to 3.38.0, which depends on
      rack (>= 1.6.0)

    rack-mini-profiler (~> 2.0) was resolved to 2.3.4, which depends on
      rack (>= 1.2.0)

    webpacker (~> 5.0) was resolved to 5.4.3, which depends on
      rack-proxy (>= 0.6.1) was resolved to 0.7.4, which depends on
        rack

    sass-rails (>= 6) was resolved to 6.0.0, which depends on
      sassc-rails (~> 2.1, >= 2.1.1) was resolved to 2.1.2, which depends on
        sprockets (> 3.0) was resolved to 4.2.0, which depends on
          rack (>= 2.2.4, < 4)

    fat_free_crm was resolved to 0.20.1, which depends on
      devise (~> 4.6) was resolved to 4.8.1, which depends on
        warden (~> 1.2.3) was resolved to 1.2.9, which depends on
          rack (>= 2.0.9)

Bundler could not find compatible versions for gem "railties":
  In Gemfile:
    fat_free_crm was resolved to 0.20.1, which depends on
      devise (~> 4.6) was resolved to 4.8.1, which depends on
        railties (>= 4.1.0)

    rails (~> 6.1.7) was resolved to 6.1.7, which depends on
      railties (= 6.1.7)

    fat_free_crm was resolved to 0.20.1, which depends on
      responders (~> 3.0) was resolved to 3.0.1, which depends on
        railties (>= 5.0)

    sass-rails (>= 6) was resolved to 6.0.0, which depends on
      sassc-rails (~> 2.1, >= 2.1.1) was resolved to 2.1.2, which depends on
        railties (>= 4.0.0)

    web-console (>= 4.1.0) was resolved to 4.2.0, which depends on
      railties (>= 6.0.0)

    webpacker (~> 5.0) was resolved to 5.4.3, which depends on
      railties (>= 5.2)

I was also getting the following error a while ago.

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

    fat_free_crm was resolved to 0.20.1, which depends on
      acts_as_commentable (~> 6.0.0)

I tried everything. Cleanup the gemset, changing rails version, bundler version. Nothing works.

illustriam commented 1 year ago

I'm receiving the same error. I reinstalled Rails 6.0.0 and then received this error after running bundle install.

`Fetching gem metadata from https://rubygems.org/......... Resolving dependencies.... Bundler could not find compatible versions for gem "acts_as_commentable": In Gemfile: acts_as_commentable (~> 4.0, >= 4.0.2)

fat_free_crm (~> 0.20.1) was resolved to 0.20.1, which depends on
  acts_as_commentable (~> 6.0.0)

Could not find gem 'acts_as_commentable (~> 6.0.0)', which is required by gem 'fat_free_crm (~> 0.20.1)', in rubygems repository https://rubygems.org/ or installed locally.

The source contains the following gems matching 'acts_as_commentable':

CloCkWeRX commented 1 year ago

See https://github.com/fatfreecrm/fat_free_crm/blob/master/Gemfile#L90

steveyken commented 1 year ago

Yes, I solved this in my rails project with FFCRM as engine, by adding the following to the main project Gemfile:

gem 'acts_as_commentable', git: 'https://github.com/fatfreecrm/acts_as_commentable.git', branch: 'rails-61'

The issue appears to be the fact that gemspec files don't allow pegging to git or git branches (correct me if I'm wrong on this!) So in this case, fat_free_crm.gemspec can't peg acts_as_commentable to branch rails-61. Perhaps we could release our version of acts_as_commentable as a gem and peg to that. I see there have been attempts to get Zendesk to update upstream, but they haven't done anything.

Thanks for porting it, @CloCkWeRX