Displaying 20 results from an estimated 3000 matches similar to: "How can I utilize this library within my Rails app?"
2007 Feb 19
2
Integrate scruffy graph in rails view?
Hi everybody,
I''m using scruffy to create some graphs, and would like to integrate
them into a regular view (i.e. show them in an <img> tag).
However, I get errors when using img_tag, or the image doesn''t load if
I try saving the graph to disk and then loading them in html.
Generating the graph and linking to it works, however then I only have
the graph open in a new
2006 Nov 10
2
How to integrate Scruff Images
Hi Folks,
since I have scruffy up and running now I´d like to integrate the
desired images on some of my rails views. But neither scruffy nor rails
docs say something about this and I cannot find examples or help on
this. So I hope somebody on this forum has experiences in integrating
scruffy images on rails views.
I find out how to go the easy and obvious way: Export image to a file
and then
2008 Feb 29
1
Scruffy Stacked Bar Chart
Hi-
Trying to do a stacked bar chart, but nothing is rendering when I add
more then 1 bar:
This works:
graph = Scruffy::Graph.new(:title => "My Chart")
graph.add :stacked do |stack|
stack.add(:bar, ''Stack1'', [10,10])
end
This doesn''t:
graph = Scruffy::Graph.new(:title => "My Chart")
graph.add :stacked
2008 Jan 14
15
How to get a Window handle from another app?
Hello,
I would like to get a window handle from another app outside of wxRuby
and convert it into a wxRuby Window handle so that I can use it as the
parent Window for several wxRuby child windows. Basically I want to use
the FRAME_FLOAT_ON_PARENT window style so that my wxRuby windows become
associated with the outside app kind of like toolbars, e.g., they don''t
show up in the
2006 Jan 09
6
Rendering dynamic Gruff image (send_data)
Dears,
Got a controller witch do a send_data for displaying a chart.
like :
send_data(g.to_blob, :filename => "any.png", :type => ''image/png'',
:disposition=> ''inline'')
I actually do a
<img src="http://myhost:3000/stats/make_graph" />
Is there any way more clean to do that ? At minima don''t hardcode the
beginning
2006 Feb 08
2
Extending Rails classes
Whereabouts would I want to put a Ruby file that extends a Rails class?
Say, adding a method to ActiveRecord::Base or something along those
lines. I''ve read that those classes go in /lib, but my application
doesn''t seem to see the changes I''ve made. Obviously I''m missing
something...
Any suggestions would be appreciated!
-Brasten
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
2007 Aug 09
1
displaying svg chart
dear railers
I was attempting to display a svg chart inside a tooltip in rails
using Scruffy.
my browser is Firefox 2 and i am using WEBRICK.
when i render inside the controller using
graph.render(:size=> [255,205], :to => ''C:\xyz.svg)
and serve iit via rhtml using the <embed> tag.
Instead of the chart inside the tooltip i get a dialog box asking me
to open it ... with
2005 Mar 08
3
Extracting images from a DB
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I would like to extract an image BLOB from my database and display it
alongside some other information on my ''edit'' page. I read the
information here
http://wiki.rubyonrails.com/rails/show/HowtoUploadFiles
and that was really helpful.
However, it still isn''t clear to me how I would get access to the image
in my views if
2006 Jun 16
10
Issue with caching of .PNG files in IE..
I''m running a Rails application with WEBrick server. We are displaying
an Image from the server to the Client (Browser). First time on the
browser everything looks fine, upon clicking the link, it contacts the
server and displays in IE brwoser the image that was stored on the
server.
But in case if the image gets changed on the server(File Name being the
same), then even though i
2006 Jan 31
13
Acts_as_authenticated
Hello
I have been trying a number of security/login generators recently. My
favourite so far is the Acts_as_authenticated. I like the fact that it
is only billed as a starting point and doesn''t try to do everything.
I would like to add security roles to it, so that some of my controller
actions can only be used by an admin role. Has anybody implemented this
using
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
2007 Nov 05
0
Scruffy > MVC architecture?
Hi,
I am a newby in rails...and i have read that scruffy is a great tool to
create/display images.
Now i find the code below for example...
graph = Scruffy::Graph.new
graph.title = "Comparative Agent Performance"
graph.value_formatter = Scruffy::Formatters::Percentage.new(:precision
=> 0)
graph.add :stacked do |stacked|
stacked.add :bar, ''Jack'', [30, 60, 49, 29,
2006 Apr 07
3
Inline editing of datetime and dropdown select objects?
I don''t believe that Rails has support for the inline editing of
datetime objects or dropdown combo boxes.
Does anyone have a helper function or two that would allow me to do such
a thing?
--
Posted via http://www.ruby-forum.com/.
2007 Mar 29
2
rmagick - Incorporating dynamic images
Hi --
I have imagemagick and rmagick installed so that I can produce images
from code to a file. Can anyone direct me to where I can find
guidance on how to have those images included on a web page (e.g.,
<img src="my_dynamically_generated_image") instead of having them sent
to a file? Thanks for any input.
... doug
--~--~---------~--~----~------------~-------~--~----~
You
2008 Feb 04
0
Scruffy Bar Chart Question
Hi-
I have been using Scruffy for a couple days and it''s worked out really
well. I am stuck though getting a bar chart to work with a single
line.
Here''s what I am doing:
general chart stuff..graph.new...etc
...
my_graph.add(:bar, ''GOAL'', [250,350])
my_graph.add(:bar, ''ACTUAL'', [150,200])
This works, but what I was is a SINGLE Bar with one
2008 Feb 07
6
Buffer flushing
Short question: is there way to tell EM to actually send data after
send_data call?
I''m building a file transferring app. I send Mashal.dump''ed metadata
first, and then - the file contents (chunked). I found a silly bug:
receive_data() gets marshalled metadata and the first chunk of the
file in a single variable.
Like that:
c1.send_data("meta")
2006 May 18
7
Server out to excel
How would one server out to excel a html table with the mime/content
type
application/vnd.ms-excel ?
In PHP it would be something like
?php
header("Content-Type: application/vnd.ms-excel");
------
But how do I do this in rails?
Cheers Glenn
--
Posted via http://www.ruby-forum.com/.
2008 Jan 06
5
Having very odd problems with UDP.
I am using eventmachine 0.8.1 on windows XP and am having very odd problems.
This snippet of code gives the error that follows it.
class EchoServer
def receive_data data
puts data
send_data ">>>you sent: #{data}"
if data =~ /quit/i
puts "quitting"
close_connection
EventMachine::stop_event_loop
end
end
end
2006 Mar 04
13
file_column
Restricting size of an uploaded file, is how is that possible? If I
do not want a user to upload a file larger than X bytes, can it
easily be done?
If I also would like restrict the types of files that can be
uploaded, how may I do so?
Thank you,
Sharkie