【问题标题】:Devise - RoR: error running rails generate devise:install设计 - RoR:错误运行轨道生成设计:安装
【发布时间】:2014-04-16 00:32:48
【问题描述】:

有人可以帮帮我吗?

我正在遵循https://github.com/plataformatec/devise 的“入门”指令,当我运行rails generate devise:install 时出现以下错误(我的 ruby​​ 版本为 1.8.3 和 Rails 3.2.17):

C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `re
quire': C:/Ruby187/lib/ruby/gems/1.8/gems/devise-3.2.4/lib/devise.rb:452: syntax
error, unexpected ':', expecting kEND (SyntaxError)
...ults mapping.name, strategies: mapping.strategies
                          ^
        from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.6.2/lib/bundler/runtime
.rb:76:in `require'
    from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.6.2/lib/bundler/runtime
.rb:72:in `each'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.6.2/lib/bundler/runtime
.rb:72:in `require'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.6.2/lib/bundler/runtime
.rb:61:in `each'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.6.2/lib/bundler/runtime
.rb:61:in `require'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/bundler-1.6.2/lib/bundler.rb:132:
in `require'
        from C:/Users/Adit/Documents/Rails/blog187/config/application.rb:7
        from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.17/lib/rails/command
s.rb:24:in `require'
        from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.17/lib/rails/command
s.rb:24
        from script/rails:6:in `require'
        from script/rails:6

【问题讨论】:

  • 你真的,真的需要升级你的 Ruby 版本。

标签: ruby-on-rails ruby devise ruby-on-rails-3.2


【解决方案1】:

您尝试使用的设计版本(设计 3)与 Ruby 1.8.3 不兼容

如果可能,请将您的 Ruby 更新到 1.9.3 或更高版本。

【讨论】:

  • 我不能,我使用的网络主机不允许我更新 Ruby,这意味着我被这个 sh*t 版本卡住了。谢谢回答。你还有什么建议吗?
  • 将 Gemfile 中的设计设置为次要版本。尝试使用 2.2.8 或任何 2.2
猜你喜欢
  • 2013-06-12
  • 1970-01-01
  • 2012-06-13
  • 2023-03-13
  • 1970-01-01
  • 1970-01-01
  • 2012-01-07
  • 2012-01-05
  • 1970-01-01
相关资源
最近更新 更多