【问题标题】:Rails 4 Server Not Starting (Active Support)Rails 4 服务器未启动(主动支持)
【发布时间】:2013-07-03 14:31:20
【问题描述】:

我正在将我的应用程序从 Rails 3.2 升级到 Rails 4,并在尝试启动正在开发的服务器时遇到此错误。有关如何解决此问题的任何想法?

/Users/timkleier/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies/autoload.rb:1:in `require': /Users/timkleier/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:128: undefined (?...) sequence: /\b(?<!['\342\200\231`])[a-z]/ (SyntaxError)
from /Users/timkleier/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies/autoload.rb:1
from /Users/timkleier/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support.rb:25:in `require'
from /Users/timkleier/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support.rb:25
from /Users/timkleier/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch.rb:24:in `require'
from /Users/timkleier/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch.rb:24
from /Users/timkleier/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands/server.rb:3:in `require'
from /Users/timkleier/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands/server.rb:3
from /Users/timkleier/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:72:in `require'
from /Users/timkleier/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:72
from script/rails:6:in `require'
from script/rails:6

这是我的 Gemfile 以及相关的 gem:

source 'http://rubygems.org'

gem 'rails', '4.0.0'
gem 'activerecord'

gem 'execjs'
gem 'therubyracer'
gem "composite_primary_keys", :git => 'git://github.com/drnic/composite_primary_keys.git', :branch => 'ar_4.0.x'
gem "tiny_tds", "~> 0.5.1"

gem 'twitter-bootstrap-rails'
gem "less-rails"

gem 'sass-rails', '4.0.0'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.0'
gem 'jquery-rails', '2.2.1'

在config/application.rb中,我已经根据这个post注释掉了Active Resource,但是好像没有关系。

【问题讨论】:

    标签: ruby-on-rails ruby-on-rails-4 activesupport


    【解决方案1】:

    gsubwhere the syntax error is being produced 包含

    希望这能给你一些帮助,也许看看你的 Ruby 安装。

    【讨论】:

    • 感谢您,我没有意识到这表明存在 Ruby 版本问题。我以为我的默认设置正确,但显然不是。使用 JewelryBox,我将 gemset 和 Ruby 2.0.0 设置为默认值。好像已经修好了。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-15
    • 1970-01-01
    • 1970-01-01
    • 2017-01-23
    • 1970-01-01
    • 2023-04-05
    相关资源
    最近更新 更多