带有wash_out的Rails服务器中的语法错误

时间:2013-04-03 18:19:09

标签: ruby-on-rails ruby-on-rails-3 soap

我正在尝试使用Ruby on Rails 3构建SOAP服务。经过大量研究后我发现Wash_out

现在,当我将gem添加到我的gemfile时,就像这样:

gem 'wash_out'

我的rails应用程序不再启动了,我的意思是,当我输入'rails s'时,它给了我一个flush_out错误。

/usr/lib/ruby/gems/1.8/gems/wash_out-0.6.1/lib/wash_out.rb:3:in `require':     /usr/lib/ruby/gems/1.8/gems/wash_out-0.6.1/lib/wash_out/dispatcher.rb:19: syntax error, unexpected '\n' (SyntaxError)
from /usr/lib/ruby/gems/1.8/gems/wash_out-0.6.1/lib/wash_out.rb:3
from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `require'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `require'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `require'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `require'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.3.4/lib/bundler.rb:132:in `require'
from /home/TheBcd/Escritorio/ws/config/application.rb:7
from /usr/lib/ruby/gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require'
from /usr/lib/ruby/gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:53
from /usr/lib/ruby/gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /usr/lib/ruby/gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:50
from script/rails:6:in `require'
from script/rails:6

我非常感谢你的帮助,非常感谢你。

2 个答案:

答案 0 :(得分:1)

wash_out requires Ruby 1.9。你的回溯显示Ruby 1.8。

答案 1 :(得分:1)

从您的跟踪日志中我假设您正在使用ruby 1.8并且对gem的github的简短读数显示了这一点:

  

Rails>仅限3.0。 MRI 1.9,2.0,JRuby(--1.9)。

     

自0.5.3起,Ruby 1.8不受官方支持。我们会接受   进一步的兼容性请求,但没有即将推出的版本   对它进行了测试。

因此,如果你想使用支持1.8的gem,最好将版本锁定到0.5.3下的任何内容。尝试将你的Gemfile中的宝石版本设置为该版本下的某个版本,它可能会起作用,但就像他们说的那样,它无法保证。