Help me debug the following program in ruby | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Help me debug the following program in ruby

The program below is expected to display a simple graph using gnuplot gem but don't know why it's giving runtime error . Help me fix it . https://code.sololearn.com/cZ0bCe99Kwta/?ref=app

15th Jul 2023, 11:28 AM
Manuphile
Manuphile - avatar
3 Respostas
+ 2
Does your program work on your own computer? Read your runtime error. The gnuplot executable is not found. gnuplot is a linux utility that must be installed separately. http://www.gnuplot.info/ The ruby gem 'gnuplot' is only a wrapper for this, it depends on the existence of pre-installed gnuplot. You can see installation instructions here: https://github.com/rdp/ruby_gnuplot/tree/master I think this is not going to work on Sololearn.
15th Jul 2023, 12:49 PM
Tibor Santa
Tibor Santa - avatar
+ 2
Oh ok it's funny and crazy to expect sl for such things šŸ¤­šŸ˜†šŸ˜…
15th Jul 2023, 12:51 PM
Manuphile
Manuphile - avatar
+ 1
Your code not getting the path of installed gem it will work on your system . If u wana test in phone u can try with heroku connect your GitHub with heroku
15th Jul 2023, 5:01 PM
A S Raghuvanshi
A S Raghuvanshi - avatar