2013-07-03 64 views
0

尝试启动开发服务器时,我升级我的应用程序从Rails的3.2到Rails 4和遇到这个错误。有关如何解决这个问题的任何想法?轨道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有关宝石:

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' 

在配置/ application.rb中,我已经根据post注释掉活动资源,但它似乎是不相关的。

回答

0

gsubwhere the syntax error is being produced包括在< Ruby 1.9.3中不支持的Regexp语法,并且会在这些版本中产生相同的错误。然而,你的路径显示Ruby 2.0.0,这很奇怪,所以我不完全确定发生了什么。

希望,让你的东西,虽然下去了,看看你的Ruby安装可能。

+1

感谢这一点,我没有意识到它是一个Ruby版本问题的指示。我以为我有正确的默认设置,但显然不是。使用JewelryBox,我将gemset和Ruby 2.0.0设置为默认值。似乎修复了它。 –