[MacRuby-devel] rss module throws exception on including

Jakub Suder jakub.suder at gmail.com
Tue Jun 24 16:48:14 PDT 2008


Hello,

I tried to implement a sample photo RSS application according to  
Apple's tutorial "Building a RubyCocoa Application: A Tutorial" using  
MacRuby. However,  I'm getting such error:

----
/Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/1.9.0/ 
rss/dublincore.rb:88:in `module_eval': /Library/Frameworks/ 
MacRuby.framework/Versions/0.2/usr/lib/ruby/1.9.0/rss/dublincore.rb: 
123: syntax error, unexpected $end, expecting keyword_end (SyntaxError)
             target.new_
                        ^
	from /Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
1.9.0/rss/dublincore.rb:88:in `block (1 levels) in  
<module:DublinCoreModel>'
	from /Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
1.9.0/rss/dublincore.rb:87:in `each'
	from /Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
1.9.0/rss/dublincore.rb:87:in `<module:DublinCoreModel>'
	from /Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
1.9.0/rss/dublincore.rb:54:in `<module:RSS>'
	from /Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
1.9.0/rss/dublincore.rb:3:in `<top (required)>'
	from /Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
1.9.0/rss.rb:11:in `require'
	from /Library/Frameworks/MacRuby.framework/Versions/0.2/usr/lib/ruby/ 
1.9.0/rss.rb:11:in `<top (required)>'
----

This error can be reproduced by simply running macirb from the  
terminal and doing require 'rss'. Same thing happens when I download  
the latest version of the file dublincore.rb and include it. What's  
interesting is that this error isn't displayed when I include the same  
file using plain irb. This probably means that it's not a bug in that  
file, but in the parser that interprets it.

I've tried to download and compile the latest version from trunk and  
the testing version to check if this happens in those versions too,  
but I'm unable to install any of them - both of them throw such  
exception on 'sudo rake install':

----
(in /Users/psionides/Downloads/MacRuby-trunk)
./miniruby instruby.rb --make="/usr/bin/make" --dest-dir="" -- 
extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog- 
mode=0755 --installed-list .installed.list --mantype="doc"
installing binary commands
/Users/psionides/Downloads/MacRuby-trunk/lib/fileutils.rb:1259:in  
`initialize': Is a directory - /Library/Frameworks/MacRuby.framework/ 
Versions/0.3/usr/bin/  
(Errno::EPERM::ENOENT::ESRCH::EINTR::EIO::ENXIO::E2BIG::ENOEXEC::EBADF::ECHILD::EAGAIN::ENOMEM::EACCES::EFAULT::ENOTBLK::EBUSY::EEXIST::EXDEV::ENODEV::ENOTDIR::EISDIR::EINVAL::ENFILE::EMFILE::ENOTTY::ETXTBSY::EFBIG::ENOSPC::ESPIPE::EROFS::EMLINK::EPIPE::EDOM::ERANGE::EDEADLK::ENAMETOOLONG::ENOLCK::ENOSYS::ENOTEMPTY::ELOOP::ENOMSG::EIDRM::ENOSTR::ENODATA::ETIME::ENOSR::EREMOTE::ENOLINK::EPROTO::EMULTIHOP::EBADMSG::EOVERFLOW::EILSEQ::EUSERS::ENOTSOCK::EDESTADDRREQ::EMSGSIZE::EPROTOTYPE::ENOPROTOOPT::EPROTONOSUPPORT::ESOCKTNOSUPPORT::EOPNOTSUPP::EPFNOSUPPORT::EAFNOSUPPORT::EADDRINUSE::EADDRNOTAVAIL::ENETDOWN::ENETUNREACH::ENETRESET::ECONNABORTED::ECONNRESET::ENOBUFS::EISCONN::ENOTCONN::ESHUTDOWN::ETOOMANYREFS::ETIMEDOUT::ECONNREFUSED::EHOSTDOWN::EHOSTUNREACH::EALREADY::EINPROGRESS::ESTALE::EDQUOT::NOERROR)
	from /Users/psionides/Downloads/MacRuby-trunk/lib/fileutils.rb: 
1259:in `open'
	from /Users/psionides/Downloads/MacRuby-trunk/lib/fileutils.rb: 
1259:in `block in copy_file'
	from /Users/psionides/Downloads/MacRuby-trunk/lib/fileutils.rb: 
1258:in `open'
	from /Users/psionides/Downloads/MacRuby-trunk/lib/fileutils.rb: 
1258:in `copy_file'
	from /Users/psionides/Downloads/MacRuby-trunk/lib/fileutils.rb:462:in  
`copy_file'
	from /Users/psionides/Downloads/MacRuby-trunk/lib/fileutils.rb:838:in  
`block in install'
	from /Users/psionides/Downloads/MacRuby-trunk/lib/fileutils.rb: 
1392:in `block in fu_each_src_dest'
	from /Users/psionides/Downloads/MacRuby-trunk/lib/fileutils.rb: 
1406:in `fu_each_src_dest0'
	from /Users/psionides/Downloads/MacRuby-trunk/lib/fileutils.rb: 
1390:in `fu_each_src_dest'
	from /Users/psionides/Downloads/MacRuby-trunk/lib/fileutils.rb:834:in  
`install'
	from instruby.rb:133:in `install'
	from instruby.rb:233:in `block in <main>'
	from instruby.rb:412:in `call'
	from instruby.rb:412:in `block (2 levels) in <main>'
	from instruby.rb:409:in `each'
	from instruby.rb:409:in `block in <main>'
	from instruby.rb:405:in `each'
	from instruby.rb:405:in `<main>'
rake aborted!
----

Am I doing something wrong?...

Best regards,
Jakub Suder


More information about the MacRuby-devel mailing list