similar to: Rendering dynamic Gruff image (send_data)

Displaying 20 results from an estimated 2000 matches similar to: "Rendering dynamic Gruff image (send_data)"

2007 Apr 09
6
gruff send_data
Hi, for those with experience of Gruff module: suppose I want to send image from server straight to the browser (as example on gruff web site): send_data(g.to_blob, :disposition => ''inline'', :type => ''image/png'', :filename => "gruff.png") the server seems sending this binary data ok, but I am having
2006 May 25
2
Have a quick Gruff Graphing question
I have some graphs and everything is working great, but I''d like to set a minimum height so to speak on the vertical scale. Is there a method to do that with Gruff? I''ve tried looking through the docs but can''t seem to get it to work. So for example, if the highest datapoint in my graph was say 500, is it possible to have the minimum vertical scale on the left set
2009 Dec 24
2
Showing graphs on browser with gruff lib.
Hi, I am using "gruff" lib for creating the graphs. I have got the success to create the graph, but my problem is I don''t want to store it, I want that they should be displyed on the browser it self. I have tried this:- " send_data(g.to_blob, :disposition => ''inline'', :type => ''image/png'', :filename =>
2006 Apr 30
6
Help, Gruff is killing me
Hi all, I hope somebody can help me out here, since the issue has been killing me for the last three days. Here is the issue: It seems that gruff kills rails/webrick whenever it''s used on win32. I installed gruff per instructions and it seems to be working. The sample controller generates a nice grpah with send_data and all. The issue started once I try to use any other
2006 Apr 14
0
Gruff on Windows
Has anyone achieved a stable deployment of Gruff with Rmagick on Windows? I''ve been playing around with this on Instant Rails and after installing the RMagick win 32 gem (local gem install as per instructions on web) and then Gruff on top of that. I did a test controller method that rendered the fruit pie chart as per the examples on the gruff site. This worked. However, when I refreshed
2006 Jul 05
1
Need some Gruff graphing help - custom dimensions?
I''ve been working with Gruff to do all my apps graphing and such etc. I love it but I''m just having a hard time customizing the graphs, but this is perhaps due to my inability to comprehend the online RDocs. What I want to do is adjust the width / heights of my graphs or at the VERY LEAST the heights. It seems that if you scale a graph anywhere below 400-450px it is pretty
2006 Apr 22
1
Gruff
I have installed Gruff and am trying to get an example to work i found at http://tomcopeland.blogs.com/juniordeveloper/2006/02/charts_and_grap.html. I have the following code in the controller: # Send a graph to the browser def crumpetchartaction days = 5 g = Gruff::Line.new(500) g.title = "Crumpets over the past #{days} days" g.theme_keynote crumpets_to_date = []
2006 Jun 05
1
Strange problem with Gruff not always displaying graph
Hello, I am having a strange problem with Gruff not always displaying the graph on the page. On some pages, the graph is displayed fine. On others, however, I just get the number relating to the id of the requested item - in my case, report. Does anyone know how to solve this problem? I have the following in my controller: def create_graph g = Gruff::Line.new(290) g.title =
2010 Feb 24
6
Yet another send_data :image question...
Guys & gals, I''m also learning RoR (using v2.3.4). I''ve got a basic scaffold working for image file creation, and - to a point - image file display. The send_data function is working in my controller - no problem. The model code is able to parse the uploaded file construct too. def show @image = Image.find(params[:id]) send_data(@image.binary_data, :type =>
2008 Oct 08
11
Using image_tag and send_data
I am using image_tag to load an image that I''ve saved to the database (using attachment_fu if you''re curious but that''s probably not relevant here): VIEW <%= image_tag ''/photo/get_image/5'' %> CONTROLLER def get_image @photo=Photo.find(params[:id]) send_data(DbFile.find(@photo.db_file_id).data, :type =>
2010 Apr 29
2
send_data => invalid byte sequence in US-ASCII
I''m trying to display a generated .png plot via send_data(), but it results in a server error "invalid byte sequence in US-ASCII" error. I''m pretty sure this means that I need to specify the encoding somewhere, but I haven''t been able to figure out where or how to do so. Some particulars: I''m running gnuplot through a pipe to generate a plot in .png
2006 Jul 05
1
send_data image
I''m trying to display an image in a view from MySQL, but I''m not sure where to put the send_data call. Any help would be great. :) -- Posted via http://www.ruby-forum.com/.
2006 Apr 06
1
Rmagick file conversion
I am using rmagick to convert files stored as a tiff to either pdf or jpg for display to the user. A snippet of test code from the controller follows. It works OK. ( it does need a sanitizer ) require RMagick def pdf @sdoc = Sdoc.find(params[:id]) @fname = ''/var/www/images/'' + @sdoc.fname @nf = Magick::ImageList.new(@fname)
2006 May 22
2
Problem with send_data and csv file produced
hi, i did a search and couldn''t find wat''s the problem with my code... it seems everything is the same and the result is what i expected but i am not sure where went wrong.... using send_data function to send the csv file to the client, the file sending is successfully but when i opened the csv file, something is wrong... every statement got a "......" inverted
2006 May 17
0
send_data not working properly with link_remote_to
I''m reading an image in an link_to_remote call,and then using send_data i send the read image as :type => "image/png" :disposition => "inline"...but when the div tag gets updated i see only ascii characters .....but if i do the same operation using normal call(link_to) i see it functioning normal ....could someone explain . my view: <%=
2006 Feb 02
4
How switching global layout (application.rthml <or> custom.rhtml)
Dears, My railsapp run using ''/layout/application.rhtml'' and under some conditions ( Authenticated user, url parameter) I like to switch globally to another layout, let''s say custom.rhtml Like : class AppController < ApplicationController before_filter :context_layout def index end end # application.rb def context_layout if <context_condition>
2006 Jul 27
3
A number (id?) is added after css/js tags like style.css?1154009736
Dears, My Ror setup works.. but I can''t guess why <%= stylesheet_link_tag ''style'' , :media=> ''screen''%> is rended as <link href="/stylesheets/style.css?1154009736" media="screen" rel="Stylesheet" type="text/css" /> What is that number.. any usage ?? Or I misconfigured something ? Thanks
2009 Nov 08
2
send_data with jpeg not working
I''m a newbie having trouble using send_data to send a jpeg file to the browser for display in an html img tag. This is the relevant code from my controller (photos_controller.rb): def retrieve @photo = Photo.find(params[:id]) send_data File.read(@photo.abs_img_path), :type => "image/ jpeg", :disposition => "inline" end def download @photo =
2006 Apr 05
1
send_file VS. send_data (performance)
Does anybody know if there is a big performance/time cost difference between these two methods of serving a file: ------------------------------- #1 ----------------------------------------- send_file "test.png", :type => ''image/png'', :disposition => ''inline'' ------------------------------- #2------------------------------------------
2010 May 03
7
rendering images dynamically
Hi, I have a rails application where I respond to a request by fetching image urls from various web api calls and need to display them as they come available. I am able to display all the images once I get them all, but that causes an unacceptable delay for my user. One approach I am trying is, from my controller, set an @image variable, and then pass in a block to the model that retrieves the