无法激活 activesupport(>= 2.3.2,运行时),已激活 activesupport-2.1.2。 这是什么意思?
在尝试启动某个开源 Rails 项目的旧版本时,遇到了一条多云的错误消息:
“无法激活 activesupport(>= 2.3.2,运行时),已激活 activesupport-2.1.2”,
这是什么意思? 我的盒子上安装了 Rails 和 activesupport 的任一版本。
我很困惑...
while trying to start some old revision of an opensource rails project confronted with a cloudy error message:
"can't activate activesupport (>= 2.3.2, runtime), already activated activesupport-2.1.2"
What does it mean? Either versions of rails and activesupport are installed on my box.
I'm confused...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
通常,gem 或插件会在 Rails 尝试加载 2.3.2 之前加载 2.1.2。 解决这个问题的最佳方法可能是一次注释掉environment.rb中的每个gem要求,然后看看会发生什么。
Generally, a gem or plugin is loading 2.1.2 before Rails attempts to load 2.3.2. Best way to figure it out might be to comment out each gem requirement in environment.rb one at a time and see what happens.
如果您不需要旧版本的 gem,最简单的启动和运行方法就是将其删除。
删除旧版本。
If you don't need the older version of the gem the easiest way to get up and running is to remove it.
To remove the old versions.
您是否安装了最近的有效支持 gem?
Do you have installed the recent active support gem?
查看与错误消息关联的跟踪。 我最近遇到了这个问题,其中有一个脚本/进程/收割机实例由 Capistrano 运行并预加载旧版本。 在跟踪中,它显示了尝试加载旧版本的文件。
Look in the trace associated with the error message. I recently encountered this problem where there was an instance of script/process/reaper which was getting run by Capistrano and preloading the older version. In the trace it showed the file which was trying to load the older version.
出现该错误时,Rails 的 Active Support 无法正常工作,因为在您的计算机上安装了 Active Support Gem 的 2.1.2 版本,而该项目需要该 gem 的最新版本 (2.3.2)。
恕我直言,我认为你必须升级 gem,因为很多时候我解决了在终端上输入以下内容:
gem install gem_name
其中 gem_name 是你想要安装的 gem 的名称。 Ruby 将删除旧版本并安装新版本。
从 http://rubyforge.org/frs/?group_id=570 下载 activesupport-2.3.2.gem
并将其放在您的项目目录中并执行命令。
您可以在以下位置找到其他宝石:http://rubygems.org/
with that error, Rails' Active Support is not working, because on your machine the Active Support Gem is installed with 2.1.2 version while the project requires a recent version (2.3.2) of that gem.
IMHO, I think you have to upgrade the gem, because a lot a times I solved typing this on terminal:
gem install gem_name
where gem_name is the name of the gem you want to install. Ruby will remove the old version and install the newer.
Download the activesupport-2.3.2.gem from http://rubyforge.org/frs/?group_id=570
and place it on the directory of your project and execute the command.
You can find here other gems on: http://rubygems.org/
我也遇到了同样的错误,但后来我更新了 Rails 并下载了所有依赖项,问题得到了解决。
I was also getting the same error but later i updated the Rails and downloaded all the dependencies and issue got resolved.