Forum: Ruby on Rails Publish to static pages

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3a6666f57152610f172a77c8fe6a7420?d=identicon&s=25 marcus (Guest)
on 2006-02-08 08:35
(Received via mailing list)
I need to "publish" pages to static files (in order to transfer to a
server where Rails isn't available, this is not for caching).

When I do:

   require "open-uri"

   def publish
     File.open(publish_path, "w") do |file|
       open(base_view_path) { |res| file.write(res.read) }
     end
   end

where publish() is a method on a model running in Rails (base_view_path
is a method returning an URL to the page to publish but in "view mode").
The problem here seems to be that Webrick hangs... (I guess Webrick just
can handle a request at a time or something and it deadlocks)

Is there another solution to this problem?

Regards,

/Marcus
This topic is locked and can not be replied to.