gpt4 book ai didi

ruby-on-rails-4 - Rails 4.0安装报错-require : cannot load such file -- active_support (LoadError)

转载 作者:行者123 更新时间:2023-12-04 07:04:16 24 4
gpt4 key购买 nike

我安装了新的 Ruby (2.0) 和 Rails 4.0,当我执行“Rails new test_app”时,我得到以下信息。有人遇到过这个吗?

[devuser@devbox ~]$ rails new test_app

/usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in require': cannot load such >file -- active_support (LoadError)
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in
require' from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0.beta1/lib/rails/generators.rb:4:in ><top (required)>'
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in
require' from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in require'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties->4.0.0.beta1/lib/rails/commands/application.rb:28:in
' from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in require'
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in
require' from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0.beta1/lib/rails/cli.rb:15:in <top >(required)>'
from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in
require' from /usr/local/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in require'
from /usr/local/lib/ruby/gems/2.0.0/gems/railties-4.0.0.beta1/bin/rails:7:in
' from /usr/local/bin/rails:23:in load'
from /usr/local/bin/rails:23:in
'

最佳答案

我的问题与权限有关。不知何故,“其他”用户需要 rx 权限。我做了以下操作,现在可以使用了:

sudo chmod -R o+rx/usr/local/lib/ruby/gems/2.0.0/gems/

如果您无法加载此类文件及其指向 require 语句,请检查您对/gems 文件夹和下面文件夹的权限。

关于ruby-on-rails-4 - Rails 4.0安装报错-require : cannot load such file -- active_support (LoadError),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16326439/

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