2011-05-14 47 views
0

我的應用程序已沒有任何麻煩以下線在最新版本的軌道:如何解決在語言學庫錯誤在Rails的3.1和Ruby 1.9.2

gem 'linguistics' # in Gemfile 

Linguistics::use(:en, :installProxy => :en) # In environment.rb 

近日筆者從升級1.8.7紅寶石至Ruby 1.9.2,並使用Rails的邊緣版本。當我啓動服務器,我現在看到以下內容:

=> Booting WEBrick 
=> Rails 3.1.0.beta1 application starting in development on 
http://0.0.0.0:3000 
=> Call with -d to detach 
=> Ctrl-C to shutdown server Exiting /Users/alextan/.rvm/gems/ruby-1.9.2-p180/gems/linguistics-1.0.8/lib/linguistics.rb:177:in 
`en': can't modify frozen object 
(RuntimeError) from (eval):6:in 
`method_missing' from 
/Users/alextan/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0.beta1/lib/rails/commands/server.rb:78:in 
`middleware' from 
/Users/alextan/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0.beta/lib/rack/server.rb:291:in 
`build_app'  from 
/Users/alextan/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0.beta/lib/rack/server.rb:301:in 
`wrapped_app' from 
/Users/alextan/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.3.0.beta/lib/rack/server.rb:252:in 
`start'  from 
/Users/alextan/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0.beta1/lib/rails/commands/server.rb:69:in 
`start'  from 
/Users/alextan/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0.beta1/lib/rails/commands.rb:53:in 
`block in <top (required)>'  from 
/Users/alextan/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0.beta1/lib/rails/commands.rb:48:in 
`tap' from 
/Users/alextan/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0.beta1/lib/rails/commands.rb:48:in 
`<top (required)>' from 
script/rails:6:in `require'  from 
script/rails:6:in `<main>' 

我如何能解決這個問題的任何想法?這是語言學和Ruby 1.9.2之間的不兼容嗎?

回答

1

我認爲它主要是一個導軌兼容性問題,因爲在提交1.9.2 compat時提到過,試着一個接一個,不能兩個在一起,以確保1.9.2和rails 3能夠工作,之後切換到edge rails 。

你可能想嘗試,如果有實際的版本在那裏,嘗試(包括該版本然後在您的Gemfile):

gem update linguistics --pre 

或被肯定有它在你的Gemfile更新

gem 'linguistics', :git => 'https://github.com/ged/linguistics.git' 
相關問題