Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Atom feed apparently not compatible with Ruby > 1.9 #124

Open
rohieb opened this issue Jun 20, 2020 · 0 comments
Open

Atom feed apparently not compatible with Ruby > 1.9 #124

rohieb opened this issue Jun 20, 2020 · 0 comments

Comments

@rohieb
Copy link

rohieb commented Jun 20, 2020

Browsing the feed URL for a poll only results in a HTTP/500 Bad Gateway, and in the nginx error log I get:

2020/06/20 20:58:03 [error] 13619#13619: *68 FastCGI sent in stderr: "/srv/www/dudle/gems/gems/atom-0.1/lib/xmlmapping.rb:34:in `initialize': wrong number of arguments (given 0, expected 1) (ArgumentError)
	from /srv/www/dudle/testestestestestes/atom.cgi:31:in `new'
	from /srv/www/dudle/testestestestestes/atom.cgi:31:in `<main>'" while reading response header from upstream, client: 192.168.122.2, server: [redacted], request: "GET /testestestestestes/atom.cgi HTTP/1.0", upstream: "fastcgi://unix:/run/fcgiwrap.socket:"

When I try to run atom.rb manually, this results in parser errors:

$ ruby /srv/www/dudle/atom.rb 
Traceback (most recent call last):
	3: from /srv/www/dudle/atom.rb:23:in `<main>'
	2: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
	1: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require': /srv/www/dudle/gems/gems/atom-0.3/lib/atom.rb:41: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' (SyntaxError)
					when 'text': 'text/plain'
					           ^
/srv/www/dudle/gems/gems/atom-0.3/lib/atom.rb:42: syntax error, unexpected keyword_when, expecting keyword_end
					when 'html': 'text/html'
					^~~~
/srv/www/dudle/gems/gems/atom-0.3/lib/atom.rb:42: syntax error, unexpected ':', expecting keyword_end
					when 'html': 'text/html'
					           ^
/srv/www/dudle/gems/gems/atom-0.3/lib/atom.rb:43: syntax error, unexpected keyword_when, expecting keyword_end
					when 'xhtml': 'text/xhtml'
					^~~~
/srv/www/dudle/gems/gems/atom-0.3/lib/atom.rb:43: syntax error, unexpected ':', expecting keyword_end
					when 'xhtml': 'text/xhtml'
					            ^
/srv/www/dudle/gems/gems/atom-0.3/lib/atom.rb:49: syntax error, unexpected tLABEL_END, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or tSTRING_END
...when 'text/plain', 'text/html': element.texts.map {|t| t.val...
...                             ^~
/srv/www/dudle/gems/gems/atom-0.3/lib/atom.rb:50: syntax error, unexpected keyword_when, expecting keyword_end
				when 'text/xhtml' :
				^~~~
/srv/www/dudle/gems/gems/atom-0.3/lib/atom.rb:50: syntax error, unexpected ':', expecting keyword_end
				when 'text/xhtml' :
				                  ^
/srv/www/dudle/gems/gems/atom-0.3/lib/atom.rb:57: syntax error, unexpected keyword_end, expecting end-of-input

According to this Stack Overflow post the atom module is not compatible with Ruby 2.5? I don't know if https://github.com/sr/atom is the canonical source for it, but also the last release on rubygems is from 2009, sothe module looks unmaintained.

Possibly the code should be ported to a more recent gem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant