更新旧版gem后出现ruby“gem not found”错误

t1rydlwq  于 2023-10-17  发布在  Ruby
关注(0)|答案(1)|浏览(125)

更新机架从2.2.7到3.0.8现在我得到以下错误后运行捆绑安装:

C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems.rb:265:in `find_spec_for_exe': can't find gem rack (>= 0.a) with executable rackup (Gem::GemNotFoundException)
from C:/Ruby30-x64/lib/ruby/site_ruby/3.0.0/rubygems.rb:284:in `activate_bin_path'
from C:/Ruby30-x64/bin/rackup:25:in `<main>'

当gem rack-session显然需要更新的版本或机架时,错误开始:

C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/rack-2.2.7/lib/rack/session/cookie.rb:155:in `<class:Cookie>': undefined method `DelegateClass' for Rack::Session::Cookie:Class

所以我更新到最新版本,并删除旧版本的机架,现在我得到的错误,我该怎么办?

vmjh9lq9

vmjh9lq91#

从rack 3.0.0开始,rackup可执行文件从rack提取到单独的rackup gem。因此,要在rack >= 3.0中使用rackup命令,还必须添加

gem "rackup"

你的Gemfile

相关问题