Domanda

I've noticed that when i run a ruby command prompt and enter anything, i always get something returned.

4
=> 4

4.class
=> Fixnum

The command prompt is fine but i want somewhere to save my ruby so i can open it again later etc.

I downloaded netbeans and noticed that 4 and 4.class didn't actually return anything. Fine I thought, maybe that's because it's JRuby or something. I downloaded Komodo Edit and that behaves the same, 4 and 4.class do not return a value when i run the script from Komodo Edit.

The default intepreter path in Komodo Edit 8 is set to

C:\Ruby200-x64\bin\ruby.exe

Can I setup netbeans or komodo edit to behave the same as a ruby command prompt by returning something for every piece of code i enter? Is there another IDE I can use to accomplish this?

È stato utile?

Soluzione

Use the following process for Komodo Edit:

  • Click Tools=>Run Command
  • In the Run field, enter %(ruby) -i %f
  • In the Run in: field, select New Console or Command Output Tab
  • Check Add to Toolbox

References

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top