-bonjour , je veux utilisé le pluging ‘gruff’ qui sert a crée des
graphes , je l’ai installé avec la commande :
gem install gruff
-ce pluging besoin RMagick pour afficher les graphes , je l’ai
installé lui aussi avec la commande:
gem install rmagick
-Mais quand j’ai appliqué un exemple que j’ai trouvé dans l’internet
j’ai l’erreur suivante :
no such file to load – RMagick2 !
dans le controlleur j’ai:
def demogruff
require ‘gruff’
g = Gruff::Line.new
g.title = “My Graph”
g.data(“Apples”, [1, 2, 3, 4, 4, 3])
g.data(“Oranges”, [4, 8, 7, 9, 8, 9])
g.data(“Watermelon”, [2, 3, 1, 5, 6, 8])
g.data(“Peaches”, [9, 9, 10, 8, 7, 9])
g.labels = {0 => ‘2003’, 2 => ‘2004’, 4 => ‘2005’}
filename = ‘my_fruity_graph.png’
this writes the file to the hard drive for caching
and then writes it to the screen.
g.write(filename)
send_file filename, :type => ‘image/png’, :disposition => ‘inline’
end
dans ma vue j’appele la fonction par
-je veux savoir la solution de ce probléme si possible et merci
d’avance.