我在Ubuntu系统上设置了RefineryCMS / Ryby当进入项目文件夹并运行Rails服务器时,系统会告诉我此
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`
捆绑器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 install bundler -v 1.17.3的命令成功运行但是,当前的捆绑软件是2.1.4如何“摆脱”该2.1.4或说服精炼厂与2.1.4一起使用?
选项1:
卸载捆绑程序v2.1.4
选项2:
您可以指定要使用的旧版本的捆绑程序:
bundle _1.17.3_ install
((不指定这样的版本,您的系统将使用最新安装的版本-即2.1.4-因此您看到的错误。)
选项3:
将refinerycms
的版本更新为v3.0.0
(2015年9月19日发行)或更高版本(最新版本为v4.0.3
)。
快速浏览宝石的历史发现,version 2.x.x
依赖于捆绑器2.x.x
(这可能是完全不必要的依赖!);而< 2.0
删除了此约束。
您绝对应该使用RefineryCMS的更新版本。对于Rails 6,您必须使用Github的master分支,如下所示:
version 3.0.0
尚无发行版支持Rails 6。
某些扩展,特别是3.0.0
扩展尚未为Rails 6准备好,甚至主库也缺乏支持。您可能想要使用Rails 5.2.x,Rails团队仍然支持。然后,您应该可以使用发布的RefineryCMS 4.0.x版本。
希望这会有所帮助!
谢谢你们。我降级到Rails 5.2.0,现在它卡在actionmailer上了
gem 'refinerycms', git: 'https://github.com/refinery/refinerycms'