nerab / dropcaster

Simple Podcast Publishing
http://nerab.github.io/dropcaster/
MIT License
154 stars 33 forks source link

A warning and two syntax errors #6

Closed schoeke closed 9 years ago

schoeke commented 10 years ago

pygmy ➜ ~ dropcaster
DEPRECATION WARNING: this file is deprecated and will be removed. (called from require at /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36) /home/andrej/.rvm/gems/ruby-2.1.0/gems/dropcaster-0.0.4/lib/dropcaster/channel.rb:156: warning: else without rescue is useless /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': /home/andrej/.rvm/gems/ruby-2.1.0/gems/dropcaster-0.0.4/lib/dropcaster/channel.rb:151: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' (SyntaxError) when nil : nil ^ /home/andrej/.rvm/gems/ruby-2.1.0/gems/dropcaster-0.0.4/lib/dropcaster/channel.rb:153: syntax error, unexpected keyword_when, expecting keyword_end when false : 'No' ^ /home/andrej/.rvm/gems/ruby-2.1.0/gems/dropcaster-0.0.4/lib/dropcaster/channel.rb:159: syntax error, unexpected keyword_end, expecting $end from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire' from /home/andrej/.rvm/gems/ruby-2.1.0/gems/dropcaster-0.0.4/lib/dropcaster.rb:15:in <top (required)>' from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire' from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /home/andrej/.rvm/gems/ruby-2.1.0/gems/dropcaster-0.0.4/bin/dropcaster:28:in<top (required)>' from /home/andrej/.rvm/gems/ruby-2.1.0/bin/dropcaster:19:in load' from /home/andrej/.rvm/gems/ruby-2.1.0/bin/dropcaster:19:in

' from /home/andrej/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks1.9.1:15:in eval' from /home/andrej/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks1.9.1:15:in
'

pygmy ➜ ~ gem list

* LOCAL GEMS *

activesupport (4.0.2) atomic (1.1.14) bundler (1.5.2) bundler-unload (1.0.2) dropcaster (0.0.4) executable-hooks (1.3.1) gem-wrappers (1.2.4) i18n (0.6.9) minitest (4.7.5) multi_json (1.8.4) ruby-mp3info (0.8.3) rubygems-bundler (1.4.2) rvm (1.11.3.8) thread_safe (0.1.3) tzinfo (0.3.38)

X0nic commented 10 years ago

I think I have the fix for this pushed to master. Just need to test in 1.8 and 1.9 and push a new release.

schoeke commented 10 years ago

I am not accustomed to ruby. I normally test things with the head master branch as well, but I simply do not know how I would do that with a gem package(?). Maybe adding a "Install from source" in the readme would be nice. :)

schoeke commented 10 years ago

So, I can still not use it as I do not know how to "build" from source and no updates have been pushed.

X0nic commented 10 years ago

I can't build a new gem for you, @nerab will have to do that. I will try and add a "Install from Source" section in the readme.

What version of ruby / os version do you have @schoeke ?

nerab commented 10 years ago

Just tried with ruby 2.1.0 on Ubuntu 12.04, and the tests fail miserably.

schoeke commented 10 years ago

Machine 1, Mac OS X 10.8.5: ➜ ~ ruby --version ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin12.0]

And my Machine 2, Ubuntu box 13.04: ➜ ~ ruby --version
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]

However, Ubuntu machine has RVM installed, so I can switch around there if necessary.

X0nic commented 10 years ago

Can you try 1.9.3 or 2.0? Those seem to work for me.

schoeke commented 10 years ago

➜ droptest_mp3 gem install dropcaster Fetching: ruby-mp3info-0.8.3.gem (100%) Successfully installed ruby-mp3info-0.8.3 Fetching: atomic-1.1.14.gem (100%) Building native extensions. This could take a while... Successfully installed atomic-1.1.14 Fetching: thread_safe-0.1.3.gem (100%) Successfully installed thread_safe-0.1.3 Fetching: minitest-5.2.3.gem (100%) Successfully installed minitest-5.2.3 Fetching: tzinfo-1.1.0.gem (100%) Successfully installed tzinfo-1.1.0 Fetching: i18n-0.6.9.gem (100%) Successfully installed i18n-0.6.9 Fetching: activesupport-4.1.0.rc1.gem (100%) Successfully installed activesupport-4.1.0.rc1 Fetching: dropcaster-0.0.4.gem (100%) Successfully installed dropcaster-0.0.4 Parsing documentation for activesupport-4.1.0.rc1 unable to convert "\x80" from ASCII-8BIT to UTF-8 for lib/active_support/values/unicode_tables.dat, skipping Installing ri documentation for activesupport-4.1.0.rc1 Parsing documentation for atomic-1.1.14 unable to convert "\xC4" from ASCII-8BIT to UTF-8 for ../../extensions/x86_64-linux/2.0.0/atomic-1.1.14/atomic_reference.so, skipping unable to convert "\xC4" from ASCII-8BIT to UTF-8 for lib/atomic_reference.so, skipping Installing ri documentation for atomic-1.1.14 Parsing documentation for dropcaster-0.0.4 Installing ri documentation for dropcaster-0.0.4 Parsing documentation for i18n-0.6.9 Installing ri documentation for i18n-0.6.9 Parsing documentation for minitest-5.2.3 Installing ri documentation for minitest-5.2.3 Parsing documentation for ruby-mp3info-0.8.3 Installing ri documentation for ruby-mp3info-0.8.3 Parsing documentation for thread_safe-0.1.3 Installing ri documentation for thread_safe-0.1.3 Parsing documentation for tzinfo-1.1.0 Installing ri documentation for tzinfo-1.1.0 8 gems installed ➜ droptestmp3 dropcaster /home/____/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- active_support/core_ext/logger (LoadError) from /home/_____/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /home/____/.rvm/gems/ruby-2.0.0-p353/gems/dropcaster-0.0.4/lib/dropcaster.rb:10:in <top (required)>' from /home/_______/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /home/_/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /home/__/.rvm/gems/ruby-2.0.0-p353/gems/dropcaster-0.0.4/bin/dropcaster:28:in<top (required)>' from /home/______/.rvm/gems/ruby-2.0.0-p353/bin/dropcaster:23:inload' from /home/_/.rvm/gems/ruby-2.0.0-p353/bin/dropcaster:23:in<main>' from /home/____/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:ineval' from /home/___/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in`

'

schoeke commented 10 years ago

Same for 1.9.3.

nerab commented 10 years ago

Just pushed an update that runs almost fine on ruby 2.1.0 on Ubuntu 12.04 64 bit. Only the IDV2 tags break some tests. Please let me know if you still see issues. I will also turn on Travis builds so we will get some additional test feedback.

nerab commented 10 years ago

The latest dropcaster also works with Ruby 2.0.0 on Mavericks: ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.4.0]

I will publish 0.0.5 when the unit tests are green again.

schoeke commented 10 years ago

So, under 2.1.0 it's giving me an error, but this seems file name related:

ERROR: bad URI(is not URI?): File name with many space - Is this a problem.mp3

nerab commented 10 years ago

Can you run the latest version with the --trace option and post the result?

schoeke commented 10 years ago

home//.rvm/gems/ruby-2.1.0/gems/dropcaster-0.0.4/bin/dropcaster:95:in <top (required)>': invalid option: --trace (OptionParser::InvalidOption) from /home/____/.rvm/gems/ruby-2.1.0/bin/dropcaster:23:inload' from /home//.rvm/gems/ruby-2.1.0/bin/dropcaster:23:in <main>' from /home/_____/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:ineval' from /home/_____/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `

'

nerab commented 10 years ago

--trace was only recently added to Dropcaster. Could you please try the latest version by installing with

gem install dropcaster --pre

This will add Dropcaster 0.0.5.rc1 to your system, which, besides fixing a bunch of minor issues, also adds --trace.

TIA!

schoeke commented 10 years ago
➜  droptest_mp3  gem install dropcaster --pre
Fetching: dropcaster-0.0.5.rc1.gem (100%)
Successfully installed dropcaster-0.0.5.rc1
Parsing documentation for dropcaster-0.0.5.rc1
Installing ri documentation for dropcaster-0.0.5.rc1
Done installing documentation for dropcaster after 1 seconds
1 gem installed
 ➜  droptest_mp3  dropcaster
ERROR: uninitialized constant Dropcaster::VERSION
 ➜  droptest_mp3  dropcaster --trace
INFO: Auto-detected channel file at ./channel.yml
INFO: Generating the channel with these options: {:title=>"Nokturnal Times", :subtitle=>"Kritik, Analysen und Hintergründe zu politischen, wirtschaftlichen sowie sozialen Themen werden hier vorwiegend hochgeladen.", :url=>"http://______________/podcast/index.html", :description=>"»Ich will ja gar nichts anderes, als daß die Welt so eingerichtet wird, daß die Menschen nicht ihre überflüssigen Anhängsel sind, sondern daß in Gottes Namen die Dinge um der Menschen Willen da sind und nicht die Menschen um der Dinge Willen, die sie noch dazu selbst gemacht haben.« (Theodor W. Adorno)", :auto_detect_channel_file=>true}
INFO: No enclosure URL given, using the channel's enclosure URL
ERROR: uninitialized constant Dropcaster::VERSION
DEBUG: (erb):2:in `to_rss'
DEBUG: /home/______/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/erb.rb:847:in `eval'
DEBUG: /home/____/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/erb.rb:847:in `block in result'
DEBUG: /home/___/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/erb.rb:848:in `call'
DEBUG: /home/____/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/erb.rb:848:in `result'
DEBUG: /home/_____/.rvm/gems/ruby-2.1.0/gems/dropcaster-0.0.5.rc1/lib/dropcaster/channel.rb:74:in `to_rss'
DEBUG: /home/____/.rvm/gems/ruby-2.1.0/gems/dropcaster-0.0.5.rc1/bin/dropcaster:121:in `<top (required)>'
DEBUG: /home/____/.rvm/gems/ruby-2.1.0/bin/dropcaster:23:in `load'
DEBUG: /home/____/.rvm/gems/ruby-2.1.0/bin/dropcaster:23:in `<main>'
DEBUG: /home/_____/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
DEBUG: /home/_____/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'
INFO: Run 'dropcaster --help' for further help.
nerab commented 10 years ago

I guess dropcaster --version also fails for you with

ERROR: uninitialized constant Dropcaster::VERSION

I have no idea right now why it breaks at such a simple thing. I have Ruby 2.0 with RVM, Ruby 2.1 under rbenv, and no idea why it would fail on Ruby 2.1 with RVM.

What OS are you using? Maybe this might give a hint?

schoeke commented 10 years ago
➜  droptest_mp3  dropcaster --version                     
/home/___/.rvm/gems/ruby-2.1.0/gems/dropcaster-0.0.5.rc1/bin/dropcaster:95:in `block (2 levels) in <top (required)>': uninitialized constant Dropcaster::VERSION (NameError)
    from /home/___/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/optparse.rb:1359:in `call'
    from /home/___/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/optparse.rb:1359:in `block in parse_in_order'
    from /home/___/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/optparse.rb:1346:in `catch'
    from /home/____j/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/optparse.rb:1346:in `parse_in_order'
    from /home/___/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/optparse.rb:1340:in `order!'
    from /home/____/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/optparse.rb:1432:in `permute!'
    from /home/____j/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/optparse.rb:1454:in `parse!'
    from /home/____/.rvm/gems/ruby-2.1.0/gems/dropcaster-0.0.5.rc1/bin/dropcaster:100:in `<top (required)>'
    from /home/___/.rvm/gems/ruby-2.1.0/bin/dropcaster:23:in `load'
    from /home/___/.rvm/gems/ruby-2.1.0/bin/dropcaster:23:in `<main>'
    from /home/____/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
    from /home/____/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'

➜  droptest_mp3  cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.04
DISTRIB_CODENAME=raring
DISTRIB_DESCRIPTION="Ubuntu 13.04"
nerab commented 9 years ago

Is this issue still present? I just tried the latest Ubuntu 14.04 with Ruby 2.2, and it seems to work flawlessly.

If it doesn't for you, could you please run the VM described in this Vagrantfile, and compare it to your environment?

Thanks!

schoeke commented 9 years ago

I tested it the other day. Yes, present and kicking on Mac OS X, CentOS and Ubuntu. I will test the vagrant set up and report back.

schoeke commented 9 years ago

I tested it and it works in the vagrant box. I checked it on my Ubuntu box. It seems like libxml2-dev was not installed. I installed it, it made no difference for my error initially. But if I test it now with the self-compiled version, I get an error unrelated to dropcaster (Complains about a VBR header).

Testing it on my Mac, I deleted all gems for the ruby 2.1.0p0 version and used gem install dropcaster --pre. I get the following loading errors:

After installing these with gem, the gem install dropcaster --pre does the trick on my Ubuntu and Mac. The last time I tested it was about a month ago. I still had the error back then. So, I suppose that some of the recent commits fixed it. I still get the active_support error if I do not use the pre-flag on all machines.

From my point of view, the ticket can be closed, but it feels strange for me to not have really figured out the cause.

nerab commented 9 years ago

Thanks for testing this. Yes, I updated a whole bunch of dependencies recently. I will add some notes on the runtime dependencies (libxml etc). Simply installing the gem should probably pull in all Ruby dependencies automatically.