rails controller returning nil response while running casperjs test cases with shell script
问题 I am using casper test cases with a rails application, for running the test case I am using following command. result = `cd #{Rails.root.join}/casper && casperjs test #{params[:file]}.js` The above mentioned code is working fine on development environment(webrick) but if I run this on staging(nginx+passenger) then I am getting nil response within seconds that means that the script is running asynchronously, I need to run this synchronously so that I can send a JSON response to the client. the