尝试创建新的rails应用程序时出错

时间:2017-10-17 07:21:35

标签: ruby-on-rails web-applications

当我尝试使用rails new recaptcha命令创建新的rails应用程序时,我收到以下错误。

john@john-OptiPlex-390:~/proj$ rails new recaptcha
/home/john/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:2274:in `check_version_conflict': can't activate activesupport-5.0.6, already activated activesupport-5.0.4 (Gem::LoadError)
    from /home/john/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1403:in `activate'
    from /home/john/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:89:in `block in require'
    from /home/john/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:88:in `each'
    from /home/john/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:88:in `require'
    from /home/john/.rvm/gems/ruby-2.3.1/gems/concurrent-ruby-1.0.5/lib/concurrent.rb:15:in `<top (required)>'
    from /home/john/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /home/john/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /home/john/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.4/lib/active_support/logger_silence.rb:3:in `<top (required)>'
    from /home/john/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /home/john/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /home/john/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.4/lib/active_support/logger.rb:1:in `<top (required)>'
    from /home/john/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /home/john/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /home/john/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.4/lib/active_support.rb:27:in `<top (required)>'
    from /home/john/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /home/john/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /home/john/.rvm/gems/ruby-2.3.1/gems/railties-5.0.4/lib/rails/generators.rb:6:in `<top (required)>'
    from /home/john/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /home/john/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /home/john/.rvm/gems/ruby-2.3.1/gems/railties-5.0.4/lib/rails/commands/application.rb:1:in `<top (required)>'
    from /home/john/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /home/john/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /home/john/.rvm/gems/ruby-2.3.1/gems/railties-5.0.4/lib/rails/cli.rb:14:in `<top (required)>'
    from /home/john/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /home/john/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /home/john/.rvm/gems/ruby-2.3.1/gems/railties-5.0.4/exe/rails:9:in `<top (required)>'
    from /home/john/.rvm/gems/ruby-2.3.1/bin/rails:23:in `load'
    from /home/john/.rvm/gems/ruby-2.3.1/bin/rails:23:in `<main>'
    from /home/john/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
    from /home/john/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>'
john@john-OptiPlex-390:~/proj$ 

有人可以帮我解决这个问题。

3 个答案:

答案 0 :(得分:1)

您有多个版本的activesupport。你应该删除其中一个:

$ gem list | grep activesupport

Activesupport (5.1.1, 5.0.4, 5.0.3, 5.0.2, 5.0.0.1, 4.2.6, 4.2.5, 4.2.4, 4.2.1, 4.1.6)

然后

$ gem uninstall activesupport -v 5.1.1

Successfully uninstalled activesupport-5.1.1

在您的情况下,我猜是activesupport-5.0.6

答案 1 :(得分:1)

在创建应用程序时,该命令似乎正在尝试加载多个rails依赖项。

您可以通过

解决此问题
$ gem update rails

或者

$ gem update --system

答案 2 :(得分:0)

你可以使用

ssh

然后

'Number in Scope (Aus Basisdata!D9 in Column I)
Scope.Cells(NextRow, Column).FormulaLocal = "='" & DateiPath & "]Basisdata'!$D$9"
        Column = Column + 1

由于