Is there a code for Ruby on Rails to open Command Prompt, input a line, and execute it? If not, is there something similar or an alternative I can use? Thanks, anon_comp -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On May 25, 9:24 pm, anon_comp <neocools...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Is there a code for Ruby on Rails to open Command Prompt, input a > line, and execute it? If not, is there something similar or an > alternative I can use? >system, `` or IO.popen ? Fred> Thanks, > anon_comp-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On May 25, 4:42 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On May 25, 9:24 pm, anon_comp <neocools...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Is there a code for Ruby on Rails to open Command Prompt, input a > > line, and execute it? If not, is there something similar or an > > alternative I can use? > > system, `` or IO.popen ? > > FredI''ve tried IO.popen and couldn''t seem to get it to take in additional parameters (sorry, seemed to have forgotten that information) As for the other two, I have no idea how to use them. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
anon_comp wrote:> On May 25, 4:42�pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: >> On May 25, 9:24�pm, anon_comp <neocools...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> > Is there a code for Ruby on Rails to open Command Prompt, input a >> > line, and execute it? If not, is there something similar or an >> > alternative I can use? >> >> system, `` or IO.popen ? >> >> Fred > > > I''ve tried IO.popen and couldn''t seem to get it to take in additional > parameters (sorry, seemed to have forgotten that information)Check its documentation.> As for > the other two, I have no idea how to use them.So read the docs and/or the Pickaxe Book! What''s the problem? Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
You can use system system method in the kernel class of ruby for this purpose look at this link http://ruby-doc.org/core/classes/Kernel.html#M005971 Hope this helps you. -Saurav On May 26, 1:24 am, anon_comp <neocools...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Is there a code for Ruby on Rails to open Command Prompt, input a > line, and execute it? If not, is there something similar or an > alternative I can use? > > Thanks, > anon_comp-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks everyone for the information. I got it to work :) On May 26, 5:58 am, prionko <prio...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> You can use system system method in the kernel class of ruby for this > purpose > > look at this linkhttp://ruby-doc.org/core/classes/Kernel.html#M005971 > > Hope this helps you. > > -Saurav > > On May 26, 1:24 am, anon_comp <neocools...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Is there a code for Ruby on Rails to open Command Prompt, input a > > line, and execute it? If not, is there something similar or an > > alternative I can use? > > > Thanks, > > anon_comp- Hide quoted text - > > - Show quoted text --- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.