由于activesupport错误

时间:2017-05-12 20:36:31

标签: ruby-on-rails

我正在尝试启动一个新的rails项目,但每次运行rails new时,都会收到activesupport gem错误。我卸载了activesupport并重新安装它,它仍然无法正常工作。我收到以下错误: Could not find 'activesupport' (= 5.0.1) - did find: [activesupport-5.1.1] (Gem::LoadError)

它附带了这个堆栈跟踪:

Checked in 'GEM_PATH=/Users/LukasBarry/.gem/ruby/2.3.0:/Users/LukasBarry/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0', execute `gem env` for more information
    from /Users/LukasBarry/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1438:in `block in activate_dependencies'
    from /Users/LukasBarry/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1427:in `each'
    from /Users/LukasBarry/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1427:in `activate_dependencies'
    from /Users/LukasBarry/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1409:in `activate'
    from /Users/LukasBarry/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:68:in `block in gem'
    from /Users/LukasBarry/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:67:in `synchronize'
    from /Users/LukasBarry/.rbenv/versions/2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:67:in `gem'
    from /Users/LukasBarry/.rbenv/versions/2.3.1/bin/rails:22:in `<main>'

非常感谢任何帮助。无法创建新项目非常令人沮丧。我现在也在想,宝石可能在一个错误的文件夹中,而不是在被检查的文件路径上,但是我永远无法在线找到正确的终端命令来修复它。

1 个答案:

答案 0 :(得分:0)

知道了!结果我不得不卸载rails gem然后重新安装它。谢谢!

我要放弃这一点,因为在搜索解决方案时,我在google或stackoverflow上找不到解决此特定问题的任何内容,所以希望它可以帮助其他人。