:-[] :-|| Vivek Khokhar rambles here :-O :-[]

December 6, 2007

/bin/rm: Argument list too long tmp/sessions/ruby_sess.*

Filed under: Linux, Ruby, Rails — Vivek Khokhar @ 5:25 pm
Well this happens when there are too many files to process:
Best way in this case is to do batch processing:
Sample command:
find . -name 'ruby_sess.*' -print0 | xargs -0 rm

July 26, 2007

RAILS_ROOT

Filed under: Ruby, Rails — Vivek Khokhar @ 1:38 am

RAILS_ROOT gives you relative path within the applications it works fine as far as you need the path within rails application.

How about getting absolute path to rails folder?

I found one way, and thats from the ENV hash.

You can use ENV[’PWD’] to find absolute path to the rails folder.
Any other ways ??

*Update 4th Oct 2007*

Dir.pwd is a better way

June 11, 2007

Rails RJS redirect

Filed under: Ruby, Rails — Vivek Khokhar @ 1:12 am

page.redirect_to :action => ‘thanks’, :p1 => @g_resp.params[”_code”], :p2 => @r_id

Powered by WordPress