Reputation: 67
I setup RefineryCMS/Ruby on an Ubuntu system When going in the project folder and running rails server I am being told this
from /home/andrea/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/rubygems.rb:252:in `bin_path'
/home/andrea/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/rubygems.rb:275:in `find_spec_for_exe': Could not find 'bundler' (1.17.3) required by your /home/andrea/Desktop/rubypages/foo1/Gemfile.lock. (Gem::GemNotFoundException
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:1.17.3`
The bundler 1.17.3 is installed and shows up in the list when I run gemlist bundler (2.1.4, 1.17.3)
Upon running bundle update, I get the following
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails was resolved to 6.0.2.1, which depends on
bundler (>= 1.3.0)
refinerycms (~> 2.1.0) was resolved to 2.1.4, which depends on
bundler (< 2.0, >= 1.2.2)
Current Bundler version:
bundler (2.1.4)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (< 2.0, >= 1.2.2)', which is required by gem 'refinerycms (~> 2.1.0)', in any of the sources.
The command for gem install bundler -v 1.17.3 runs successfully Yet, the current bundler is 2.1.4 How do I 'get rid' of this 2.1.4 or convince refinerycms to work with 2.1.4?
Upvotes: 1
Views: 352
Reputation: 67
Thanks both of you. I downgraded to rails 5.2.0 and now it gets stuck on actionmailer
Bundler could not find compatible versions for gem "actionmailer":
In Gemfile:
rails (~> 5.2.0) was resolved to 5.2.1.rc1, which depends on
actionmailer (= 5.2.1.rc1)
refinerycms-authentication-devise (~> 2.0) was resolved to 2.0.0, which depends on
actionmailer (>= 5.0.0, < 5.2)
Upvotes: 0
Reputation: 6126
You should definitely use an updated version of RefineryCMS. For Rails 6, you have to use the master branch from Github, like this:
gem 'refinerycms', git: 'https://github.com/refinery/refinerycms'
No released version support Rails 6 yet.
Some extensions, notably the refinerycms-blog
extension is not yet ready for Rails 6, and support is lacking even from the main repository. You may want to go for Rails 5.2.x, which is still supported by the Rails team. Then you should be fine with the released RefineryCMS 4.0.x versions.
Hope this helps!
Upvotes: 1
Reputation: 28305
Option 1:
Uninstall bundler v2.1.4
Option 2:
You can specify an older version of bundler to use like this:
bundle _1.17.3_ install
(Without specifying a version like this, your system will use the latest installed version - i.e. 2.1.4 - hence the error you are seeing.)
Option 3:
Update the version of refinerycms
, to v3.0.0
(released on September 19, 2015) or greater (the latest release is v4.0.3
).
A quick look at the gem's history reveals that version 2.x.x
was dependant on bundler < 2.0
(which may have been a totally unnecessary dependancy!); whereas version 3.0.0
removed this constraint.
Upvotes: 2