当我进入项目文件夹并运行rails服务器时,我在Ubuntu系统上安装了RefineryCMS/Ruby。
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`安装了bundler 1.17.3,并在运行gemlist时显示在列表中(2.1.4,1.17.3)
在运行包更新时,我得到以下信息
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.gem安装绑定程序-v 1.17.3的命令运行成功,当前的绑定程序是2.1.4,如何“摆脱”这个2.1.4或说服细化器使用2.1.4?
发布于 2020-01-06 18:07:39
您绝对应该使用RefineryCMS的更新版本。对于Rails 6,您必须使用Github的主分支,如下所示:
gem 'refinerycms', git: 'https://github.com/refinery/refinerycms'目前还没有发布版本支持Rails 6。
一些扩展,特别是refinerycms-blog扩展还没有为Rails 6做好准备,甚至在主存储库中也缺乏支持。您可能希望使用Rails 5.2.x,它仍然得到Rails团队的支持。那么,您应该可以使用发布的RefineryCMS 4.0.x版本。
希望这能有所帮助!
发布于 2020-01-06 17:40:26
选项1:
卸载bundler v2.1.4
备选方案2:
您可以指定一个较旧版本的bundler,如下所示:
bundle _1.17.3_ install(如果不指定这样的版本,您的系统将使用最新安装的版本--即2.1.4 -这就是您所看到的错误。)
选项3:
将refinerycms版本更新为v3.0.0 (2015年9月19日发布)或更高版本(最新版本为v4.0.3)。
快速查看gem的历史可以发现,version 2.x.x依赖于bundler < 2.0 (这可能是完全不必要的依赖!);而version 3.0.0则消除了这个约束。
发布于 2020-01-06 19:18:53
谢谢你们俩。我将其降级为rails 5.2.0,现在它被挂在了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)https://stackoverflow.com/questions/59616084
复制相似问题