gpt4 book ai didi

ruby-on-rails - 如何修复低于 "but your Gemfile requires activesupport 3.0.0"的错误

转载 作者:行者123 更新时间:2023-12-02 02:28:45 24 4
gpt4 key购买 nike

Gem::LoadError - 您已经激活了 activesupport 3.0.3,但是您的 Gemfile 需要 activesupport 3.0.0

/usr/lib/ruby/gems/1.8/gems/bundler-1.0.2/lib/bundler/runtime.rb:27:in `setup': You have already activated activesupport 3.0.3, but your Gemfile requires activesupport 3.0.0. Consider using bundle exec. (Gem::LoadError)
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.2/lib/bundler/spec_set.rb:12:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.2/lib/bundler/spec_set.rb:12:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.2/lib/bundler/runtime.rb:17:in `setup'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.2/lib/bundler.rb:100:in `setup'
from /home/maiordes/rails_apps/maiordesconto/config/boot.rb:8
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/maiordes/rails_apps/maiordesconto/config/application.rb:1
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/maiordes/rails_apps/maiordesconto/config/environment.rb:2
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /home/maiordes/rails_apps/maiordesconto/daemons/ticket_handler.rb:6

最佳答案

就像错误所说的那样,您是否考虑使用 bundle exec ? :)

通过 bundle exec 运行命令确保可用的 Gems 版本与 Gemfile 所说的完全相同。

例如:bundle exec rails ...bundle exec rake ...

关于ruby-on-rails - 如何修复低于 "but your Gemfile requires activesupport 3.0.0"的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4701820/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com