search for: response_bodi

Displaying 9 results from an estimated 9 matches for "response_bodi".

Did you mean: response_body
2012 Mar 29
2
Rails 3.2 and Streaming using response_body
I am working on a streaming download (CSV) from Rails 3.2 and am coming up against an issue of the initial page request taking a long time. The following controller code illustrates my issue: self.response_body = Enumerator.new do |y| 10_000_000.times do y << "Hello World" end end With the above, the response does seem like its streaming
2012 Sep 18
4
multiple modules defining same method included into a class
In Ruby, classes are never closed: you can always add methods to an existing class. This applies to the classes you write as well as the standard, built-in classes. All you have to do is open up a class definition for an existing class, and the new contents you specify will be added to whatever''s there. In the same regard, if module is used with the name of a pre-existing module that
2009 Sep 13
0
regrex_crawler -- a crawler which uses regular expression to catch data from website
RegexpCrawler is a crawler which uses regular expression to catch data from website. It is easy to use and less code if you are familiar with regular expression. The project site is: http://github.com/flyerhzm/regexp_crawler/tree I give an example: a script to synchronize your github projects except fork projects, , please check example/github_projects.rb require ''rubygems''
2011 May 17
1
rails render_to_string problem
Hi I`m trying to test my controller with rspec and always get an error. The error is in the render_to_string method call (without it test works fine). So could u please help me with that? users_controller.rb: def update @user.update_attributes!(params[:user]) redirect_to @user, :status => 202, :text => render_to_string(:partial => "users/show", :type =>
2010 Sep 27
3
streaming response body to client?
So I''d like to stream my response body to the client. At least under Rails2, it looks like you can pass a Proc to render :text, to do that. I am in a Rails2 app right now, but will upgrade to Rails3 sometime in the next couple months, so don''t want to set myself up for failure. Anyone know the status of streaming responses in Rails3? Is it possible? Is there a different API
2007 Jan 03
0
0.7.5 Doesn''t Let My Tests Run
The tests are all running on 0.7.4. In installed 0.7.5 as follows: - sudo gem install rspec - script/plugin install svn://rubyforge.org/var/svn/rspec/tags/ REL_0_7_5_/vendor/rspec_on_rails/vendor/plugins/rspec - script/generate rspec ZenTest (3.4.1) is also installed. Here is what happens when I run the same tests that ran on 0.7.4. (By the way, Rails is build 5065). Any help is appreciated.
2011 Sep 15
0
streaming with rails 3.1 and ruby 1.8.7
Hey! I''m working with an app where migrating to ruby 1.9.2 is currently not an option, so I can not use Rails 3.1 streaming. One of the features is sending large XML and CSV files. In Rails 3.0 I used the self.response_body {} hack which worked pretty OK. This stopped working in Rails 3.1. How can I do streaming with Rails 3.1 and ruby 1.8.7? -m. -- You received this message
2013 Feb 01
0
Add a customer renderer but I get missing template
Hi, I''m trying to include the support of Msgpack<https://github.com/msgpack/msgpack-ruby> in Rails 3.2 but when I try to return a mpac response, I get an error concerning a missing template. My renderer: Mime::Type.register ''application/x-mpac'', :mpac ActionController::Renderers.add :mpac do |mpac, options| self.content_type ||= Mime::MPAC
2013 Oct 09
0
getting selenium working with jruby/sinatra/cucumber/webrat on windows
I am trying to run cucumber/webrat with Sinatra on Jruby 1.7.3 (1.9.3) on Windows. It seems to work ok, but when I try to add selenium to webrat. I get the error shown below. It seems like it thinks it is in a linux environment or something as the error happens when it tries to start selenium server and there is a "&" at the end of the argument chain. I took a look at capybara