will help you As far as I know, there is no PHP interpreters for Ruby, so your best bet would be to make an HTTP request from your Rails app to your PHP app to get its output. This of course won't allow you to directly call any specific function or such. It might also be possible to run your Ruby application using JRuby, and at the same time, use Quercus. Quercus is a Java based PHP interpreter, so you might be able to interact through the JRuby Java interface with the Quercus parsed PHP script.
To fix the issue you can do Every method in Ruby returns the value of the last statement in the method, which is why you're getting misc. You're saying you want to output each variable. You either need separate methods, or you need to return some kind of array, object, or hash that compacts all the data you're trying to use. For example, this would return a hash:
Hope this helps I have one text area where the user types in a basic C program such as printing Hello World or addition of two numbers. Now, I want the user to be able to click on a button so that whatever code he types gets compiled and its output is shown onto another text area. , There are a couple of ways to do this in ruby: 1, Backticks
help you fix your problem This guy looks like answer your question: https://stackoverflow.com/a/17426622/159995. Or you can just use system('convert /home/icicle/Desktop/images_284.tif /home/icicle/Desktop/images_284.jpg')
Call an external API into a Ruby on Rails Application
it fixes the issue I am using a Clear bit gem. How do I call the external API in the Rails application and send data back forth without the default database to store data.I need to build a form like the Clear bit form and send data back and forth.Do I need a controller and model for the same? , To call any external url, you should require rest-client gem.
url = "https://...."
body = RestClient.get(url)