[Rails] Directing command output to a view

2009-09-27 Thread Petr Janda
Hi all, Ive recently designed a system that is started from the command line. ie. /usr/local/bin/system.rb The system is a long running task that outputs messages via puts to the shell as its being executed. I need to run this command from a rails application so that 1) it doesnt block .ie

[Rails] Re: Background tasks + multi processing

2009-04-19 Thread Petr Janda
Wouter de Bie wrote: I wouldn't run a long running process directly from your controller, since rails first renders all stuff that should be sent to the client (html/xml/js/etc) before it actually sends it. This means that the complete controller action should be finished to show something

[Rails] JRuby/glassfish v3 logging problem

2009-04-19 Thread Petr Janda
Hi all, Ive just tried to run my app with jruby and glassfish. It seems to work mostly fine, except one weird thing. Glassfish turns over log/development.log when its size hits 1.9MB, renames it to something like development.log_2009-04-20T13-57-30 but never creates a fresh development.log and

[Rails] Re: Passenger caching in development mode, wtf?

2009-04-15 Thread Petr Janda
Ok i resolved it, after hours of trying to figure it out, i noticed that the cause is having config.threadsafe! enabled in development mode. For some reason it causes caching to get enabled. This option should be documented better. Petr -- Posted via http://www.ruby-forum.com/.

[Rails] Passenger caching in development mode, wtf?

2009-04-14 Thread Petr Janda
Hi all, I updated an application to Rails 2.3.2(and ruby 1.9.1) and installed Passenger, after learning that it turns production mode on by default, i changed that to development mode. Logs are correctly being saved to development.log so i should definately be in development mode, right? Well

[Rails] Re: Passenger caching in development mode, wtf?

2009-04-14 Thread Petr Janda
I just tested with Ruby 1.8 and its the same behaviour. An clues people? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group,

[Rails] Re: Passenger caching in development mode, wtf?

2009-04-14 Thread Petr Janda
was ideal for simple setup in development mode where speed usually doesnt matter. PP Junty wrote: perhaps here: http://www.modrails.com/documentation/Users%20guide.html#RailsSpawnMethod but can't you use mongrel for development and passenger for production? Petr Janda wrote: I just

[Rails] Mongrel and application's public path problem

2009-03-31 Thread Petr Janda
Hi all, Im trying to fix a path problem. My app was developed while using fastcgi. When I did FileUtils.mkdir it created a new directory under the public directory in my application. Now in production we use mongrel + mongrel_cluster, BUT the directory is created in the application's directory

[Rails] Just how the hell do you set Cache-Control max-age?

2009-03-23 Thread Petr Janda
Hi all, Ive been googling for couple of hours and I just cant figure it out. I want to set the max-age value to 300 for the WHOLE application, regardless of development or production mode. Is there anyone that knows? Petr -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Multi-Site sessions

2009-03-21 Thread Petr Janda
No its not because one box cannot handle the load, but because certain activities the users would be doing are best done on a separate high-performance box(other than the normal web-server). -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You

[Rails] Re: Multi-Site sessions

2009-03-21 Thread Petr Janda
Anyway, session_domain works as expected. Thanks! Petr -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] Multi-Site sessions

2009-03-20 Thread Petr Janda
Hi all, Im developing an application that runs on multiple physical boxes (and thus different hostnames). Both of the boxes will run the same application (connecting to a shared postgres server). What I need is when someone logs in on box 1 (ie. box1.domain.com), and then traverses via a link to