简体   繁体   English

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

[英]Syntax error in Rails server with wash_out

I'm trying to build a SOAP service with Ruby on Rails 3. After a lot of research I found Wash_out . 我正在尝试使用Ruby on Rails 3构建SOAP服务。经过大量研究后,我发现了Wash_out

Now, when I add the gem to my gemfile, like this: 现在,当我将gem添加到我的gemfile时,如下所示:

gem 'wash_out'

My rails application no longer starts, I mean, when I type 'rails s' it gives me an error with 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

I'd appreciate any help, thank you very much. 我非常感谢你的帮助,非常感谢。

wash_out requires Ruby 1.9 . wash_out 需要Ruby 1.9 Your backtrace shows Ruby 1.8. 你的回溯显示了Ruby 1.8。

From your trace log I'm assuming you're using ruby 1.8 and a short reading of the gem's github shows this: 从您的跟踪日志中我假设您正在使用ruby 1.8并且对gem的github的简短读数显示:

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

Ruby 1.8 is not officially supported since 0.5.3. 从0.5.3开始,Ruby 1.8不受官方支持。 We will accept further compatibilty pull-requests but no upcoming versions will be tested against it. 我们将接受进一步的兼容性请求,但不会对即将发布的版本进行测试。

So, if you want to use the gem with 1.8 support it'd be wise to lock the version to anything under 0.5.3 . 所以,如果你想使用1.8支持的gem,那么将版本锁定在0.5.3任何东西都是明智的。 Try setting your gem version in your Gemfile to something under that version and it will probably work but like they say, it's not guaranteed. 尝试将你的Gemfile中的宝石版本设置为该版本下的某些东西,它可能会起作用,但就像他们说的那样,它不能保证。

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

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