Excellent! Fixed and it *does* work like a charm.
Thanks,
Pete
Michael Johann wrote:
> Hi Peter,
>
> this is a bug in JRuby where File.open throws an IOError instead of
> Errno::ENOENT.
> Rack-Cache can handle the situation if Errno::ENOENT is thrown but this never
> happens.
> I realized this a few days before and will open an issue and contribute to
> JRuby in the next hours.
>
> A workaround for you is the following:
>
> open the metastore.rb and add the following to the write method around line
> 223:
>
> def write(key, entries)
> path = key_path(key)
> File.open(path, 'wb') { |io| Marshal.dump(entries, io, -1) }
> rescue IOError
> Dir.mkdir(File.dirname(path), 0755)
> retry
> rescue Errno::ENOENT
> Dir.mkdir(File.dirname(path), 0755)
> retry
> end
>
> With this workaround the IOError is handled properly and Radiant works like a
> charm.
>
> Cheers
> Michael Johann
>
> Am 21.12.2009 um 23:56 schrieb Pete Helgren:
>
>
>> I installed Radiant on JRuby 1.4 and I get the following error when I
>> attempt to access the web app:
>>
>> /!\ FAILSAFE /!\ Mon Dec 21 22:35:35 UTC 2009
>> Status: 500 Internal Server Error
>> A file or directory in the path name does not exist.
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rack-cache/lib/rack/cache/metastore.rb:223:in
>>
>> `initialize'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rack-cache/lib/rack/cache/metastore.rb:223:in
>>
>> `open'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rack-cache/lib/rack/cache/metastore.rb:223:in
>>
>> `write'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rack-cache/lib/rack/cache/metastore.rb:78:in
>>
>> `store'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rack-cache/lib/rack/cache/context.rb:229:in
>>
>> `store'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rack-cache/lib/rack/cache/context.rb:221:in
>>
>> `fetch'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rack-cache/lib/rack/cache/context.rb:161:in
>>
>> `lookup'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rack-cache/lib/rack/cache/context.rb:64:in
>>
>> `call!'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rack-cache/lib/rack/cache/context.rb:50:in
>>
>> `call'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/head.rb
>> :9:in `call'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in
>>
>> `call'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rails/actionpack/lib/action_controller/params_parser.rb:15:in
>>
>> `call'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:93:in
>>
>> `call'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rails/actionpack/lib/action_controller/failsafe.rb:26:in
>>
>> `call'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in
>>
>> `call'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:114:in
>>
>> `call'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rails/actionpack/lib/action_controller/reloader.rb:34:in
>>
>> `run'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:108:in
>>
>> `call'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rails/railties/lib/rails/rack/static.rb:31:in
>>
>> `call'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:48:in
>>
>> `call'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in
>>
>> `each'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in
>>
>> `call'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rails/railties/lib/rails/rack/log_tailer.rb:17:in
>>
>> `call'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/content_length.rb:13:in
>>
>> `call'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:50:in
>>
>> `service'
>> /usr/local/jruby-1.4.0/lib/ruby/1.8/webrick/httpserver.rb:104:in
>> `service'
>>
>>
>> /usr/local/jruby-1.4.0/lib/ruby/1.8/webrick/httpserver.rb:65:in
>> `run'
>> /usr/local/jruby-1.4.0/lib/ruby/1.8/webrick/server.rb:173:in
>> `start_thread'
>>
>>
>> /usr/local/jruby-1.4.0/lib/ruby/1.8/webrick/server.rb:162:in
>> `start'
>> /usr/local/jruby-1.4.0/lib/ruby/1.8/webrick/server.rb:162:in
>> `start_thread'
>>
>>
>> /usr/local/jruby-1.4.0/lib/ruby/1.8/webrick/server.rb:95:in
>> `start'
>> /usr/local/jruby-1.4.0/lib/ruby/1.8/webrick/server.rb:92:in
>> `each'
>> /usr/local/jruby-1.4.0/lib/ruby/1.8/webrick/server.rb:92:in
>> `start'
>> /usr/local/jruby-1.4.0/lib/ruby/1.8/webrick/server.rb:23:in
>> `start'
>> /usr/local/jruby-1.4.0/lib/ruby/1.8/webrick/server.rb:82:in
>> `start'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:14:in
>>
>> `run'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rails/railties/lib/commands/server.rb:111
>>
>>
>>
>> /usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/radiant-0.8.1/vendor/rails/railties/lib/commands/server.rb:31:in
>>
>> `require'
>>
>> /usr/local/jruby-1.4.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
>>
>> `require'
>>
>> I can't tell from the trace which file it is looking for. I can tell
>> you that I suspect a DB issue since I had to make some changes to the
>> activerecord-jdbc configuration file for this particular DB (DB2/400).
>>
>> If I use the /admin/welcome path I get a login but when I take the
>> option to view the site I get the same error. The web page displays:
>>
>> Application error
>>
>> Change this error message for exceptions thrown outside of an action
>> (like in Dispatcher setups or broken Ruby code) in public/500.html
>>
>> Any ideas what file/path it is looking for?
>>
>> Thanks,
>>
>> Pete
>>
>> _______________________________________________
>> Radiant mailing list
>> Post: [email protected]
>> Search: http://radiantcms.org/mailing-list/search/
>> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
>>
>
> _______________________________________________
> Radiant mailing list
> Post: [email protected]
> Search: http://radiantcms.org/mailing-list/search/
> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
>
>
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant