简体   繁体   English

Devise-RoR:错误运行rails生成devise:install

[英]Devise - RoR: error running rails generate devise:install

Can someone help me?? 有人能帮我吗??

I'm following the "Getting Started" instruction from https://github.com/plataformatec/devise and when I run rails generate devise:install I got the following error (My ruby is version 1.8.3 and Rails 3.2.17): 我正在遵循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

The version of devise you are trying to use( Devise 3) isn't compatible with Ruby 1.8.3 您尝试使用的devise版本(Devise 3)与Ruby 1.8.3不兼容

If it is possible update your Ruby to 1.9.3 or newer. 如果可能,请将您的Ruby更新到1.9.3或更高版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM