First, I apologize ahead of time for any confusion / lack of clarity, this is my first stackoverflow post.
I built a custom engine for my refinery app with the typical:
rails generate refinery:engine web_users first_name:string last_name:string...
Running this puts a gem in the gemfile like so:
gem 'refinerycms-web_users', :path => 'vendor/extensions'
However, I also have 'refinerycms-acts-as-indexed', '~> 1.0.0' in my gemfile for foundation as my front-end framework (specifically for mobile menu navigation).
When running bundle update I get the following error:
refinerycms (~> 2.1.2) ruby depends on
refinerycms-core (= 2.1.2) ruby
refinerycms-web_users (>= 0) ruby depends on
refinerycms-core (2.0.10)
Is there either a solution for downgrading acts-as-index to play nice with refinerycms-core (2.0.10) or to bump up the dependency of a custom engine to refinerycms 2.1.2?
Thanks errrrybody!
Sorry, realize I didn't put the error with acts-as-indexed with refinerycms core 2.1.0:
refinerycms-acts-as-indexed (~> 1.0.0) ruby depends on
refinerycms-core (~> 2.1.0) ruby
You'll need to upgrade your extension to depend on refinerycms-core ~> 2.1.0 which you can do by opening (something like) vendor/extensions/refinerycms-web_users/refinerycms-web_users.gemspec and specifying the updated dependency version in place of what is already specified. You'll then want to ensure that it works properly with the updated version of refinerycms-core.
Related
how to resolve this type of errors
In Gemfile:
appdirect (>= 0) ruby depends on
nori (~> 2.4) ruby
google-adwords-api (>= 0) ruby depends on
google-ads-common (~> 0.9.8) ruby depends on
savon (~> 1.2.0) ruby depends on
nori (1.1.5)
Please tell. I tried updating google-adword-api gem but its not working.
Unfortunately, google-ads-common gem is sticked to old version of savon, here's what gem author says:
Savon 2 does not support the complex AdWords API wsdls. I would love to upgrade and put this to rest, but it isn't feasible at the moment. We are looking into alternatives.
In this sad situation you need to choose between conflicting gems, you can't have both at once.
I have edited appdirect to use compitable version of nori.
Here is the link to the gem
https://github.com/aditya01933/appdirect
How do I install spree_static_content? I get following error.
In Gemfile:
spree_core (~> 3.0.0) ruby
spree_core (~> 3.0.0) ruby
spree_core (~> 3.0) ruby
spree_static_content (>= 0) ruby depends on
spree_core (~> 3.1.0.beta) ruby
spree_core (= 3.0.1) ruby
spree_core (= 3.0.1) ruby
spree_core (= 3.0.1) ruby
spree_core (= 3.0.1) ruby
Could not find gem 'spree_core (~> 3.1.0.beta) ruby in any of the sources
At last it said that I need to do
bundle update
I did that but again get the same error.
The master branch of spree_static_content is, as if this writing, referencing 3.1.0.beta of Spree. Any project using an older version of Spree, like 3.0-stable, will not be compatible.
To use this gem for a 3.0-stable Spree project, you'll need to use the branch of spree_static_content that is built to run against that version of Spree. You can view it here:
https://github.com/spree-contrib/spree_static_content/tree/3-0-stable
Your Gemfile should use this line to include the gem:
gem 'spree_static_content', github: 'spree-contrib/spree_static_content', branch: '3-0-stable'
Note the branch: value. For other versions of Spree, find the matching branch of spree_static_content.
The error message tells you what to do.
The error is:
spree_static_content (>= 0) ruby depends on spree_core (~>
3.1.0.beta) ruby
That means you need spree_core 3.1.0.beta or higher.
Running bundle update will not update a gem beyond the version specified in the Gemfile.
It appears you may have the same gem listed multiple times in your Gemfile, as well.
Try adjusting your gemfile to have just one entry for spree, of the appropriate version. It will probably look like this:
gem 'spree', github: 'spree/spree'
Note that the spree documentation instructs adding spree, not spree_core. The spree gem will include the appropriate spree components of the correct version.
Please also not that updating spree is usually a little more involved than simply updating the version number and running bundle update. You will likely need to make other adjustments to your application to accommodate the new version.
I previously never had a problem with Refinery. I was refreshing my knowledge by following along to the tutorial http://railscasts.com/episodes/332-refinery-cms-basics .Then when I created a new app with Refinery CMS, I got this error
Bundler could not find compatible versions for gem "actionmailer":
In Gemfile:
refinerycms (~> 2.1.0) ruby depends on
actionmailer (< 3.3, >= 3.1.3) ruby
rails (= 4.0.0) ruby depends on
actionmailer (4.0.0)
But should not these things be there by default with the CMS? why would there be errors only now?
The latest code supports Rails 4; the gem must be sourced from the master branch, until a release is made.
Git Issue #2428 - Rails 4 support
Add to your Gemfile:
gem 'refinerycms-i18n', github: 'refinery/refinerycms-i18n', branch: 'master'
gem 'refinerycms', github: 'refinery/refinerycms', branch: "master"
# Strong parameters is a new feature not used by Refinery
gem 'protected_attributes'
Do a:
$ bundle install
Create a new Refinery app, the command will be different depending on what you want to do. For that there are a few guides that you can follow. In my case, I added it to an existing app with:
$ rails generate refinery:cms --fresh-installation
Start your server and go to: http://localhost:3000/refinery
Well, my five cents are that Refinery is not yet available for Rails 4:
Is there any cms for Rails 4?
http://refinerycms.com/
http://refinerycms.com/blog/refinery-cms-210-released
Best,
Ben.
Simply initialize the application using:
rails new my_new_application -m http://refinerycms.com/t/edge
Behind the scenes:
This command makes your application use the master branch of refinery, which supports Rails 4.
Update
Although the above is the easiest and official way, it didn't totally work for me. I had to manually run the following command after the above one:
rails generate refinery:cms --fresh-installation
Looks like the rails4 branch has been getting a bit of love over the past few days:
https://github.com/refinery/refinerycms/tree/rails4
I will try it out and update with how I get on.
OK, let's try and answer this one. This is the route I went down.
First, I installed the refinerycms gem.
gem install refinerycms
I then did a:
rbenv rehash
Then I followed the guide:
refinerycms rickrockstar
Bundler complained:
Bundler could not find compatible versions for gem "refinerycms-core":
In Gemfile:
refinerycms (~> 3.0) ruby depends on
refinerycms-images (= 3.0.0) ruby depends on
refinerycms-core (= 3.0.0) ruby
refinerycms (~> 3.0) ruby depends on
refinerycms-images (= 3.0.0) ruby depends on
refinerycms-core (= 3.0.0) ruby
refinerycms (~> 3.0) ruby depends on
refinerycms-images (= 3.0.0) ruby depends on
refinerycms-core (= 3.0.0) ruby
refinerycms (~> 3.0) ruby depends on
refinerycms-images (= 3.0.0) ruby depends on
refinerycms-core (= 3.0.0) ruby
refinerycms-wymeditor (>= 1.0.6, ~> 1.0) ruby depends on
refinerycms-core (>= 3.0.0, ~> 3.0) ruby
refinerycms-acts-as-indexed (>= 1.0.0, ~> 1.0) ruby depends on
refinerycms-core (~> 2.1.0) ruby
In my gemfile, I changed the following lines:
gem 'rails', '4.2.4'
gem 'refinerycms'
gem 'refinerycms-acts-as-indexed'
gem 'refinerycms-wymeditor'
And this solved the issue.
I had to then do a:
bundle install
Then a:
rails generate refinery:cms --fresh-installation
I posted an issue on github and got the following answer from the RefineryTeam:
It looks like the culprit was refinerycms-acts-as-indexed version - it should be ~> 2.0.1 to work with Refinery 3.0.0
https://github.com/refinery/refinerycms/issues/3072
Please also see this page where things might be running more smoothly than following the guide on Refinery's website. What is to be seen there is similar to Zuhaib Ali's answer above (in a bit more details).
Hope this helps
I created a new app in Refinery CMS and followed the instructions according to their guide. http://refinerycms.com/download
But when I go to run rails server, I get errors about gem dependencies. Normally those are easy to fix. But what to do when you have conflicting dependencies? This is one of the errors that I got
Bundler could not find compatible versions for gem "refinerycms-core":
In Gemfile:
refinerycms-blog (~> 2.0.0) ruby depends on
refinerycms-core (~> 2.0.0) ruby
refinerycms (~> 2.1.0) ruby depends on
refinerycms-core (2.1.0)
when I have ran into this problem in the past and I added the specific gem, it then would still give me an error saying that it needed the other gem as well. What am I doing wrong here?
Got a response on Twitter from the people at refinery who sent me this link
https://github.com/refinery/refinerycms/issues/2386#issuecomment-22978992
which says so change the gem to
gem 'refinerycms-blog', github: 'refinery/refinerycms-blog', branch: 'master'
I am trying to update from refinery 1.0.9 to 2.0.9 on ruby 1.9.3. I am getting this error:
Bundler could not find compatible versions for gem "refinerycms-core":
In Gemfile:
refinerycms-news (~> 1.2) ruby depends on
refinerycms-core (~> 1.0.0) ruby
refinerycms (~> 2.0.9) ruby depends on
refinerycms-core (2.0.9)
Can you help me understand the error and what to do about it?
Bundler attempts to make sure that all of the dependencies of all gems (other gems, that is) are installed and meet version requirements specified by the gem designers.
In your Gemfile, you can specify versions of Gems in several ways, the ~> method says the version can be greater than or equal to the number specified, but not so great that a major release can get installed without you knowing.
So it looks like you'll need to relax the restriction on version on the refinery-news gem which likely has a later version available than the 1.2 currently allowed (That version depends on refinerycms-core 1.0.0, but refinerycms needs a later version of the same gem).