From: Santhosh Kattissery Date: 2010-06-09T04:53:11+09:00 Subject: Re: Errno::ENOEXEC Thanks for you reply. And yes, I am trying to execute a command. puts `ls`, works for me. install bundle works for me from command line. But I want to execute it from ruby code. I did not understand "then that command needs to be installed" Alex S. wrote: > (Apologies if this is a dupe... I sent a reply email to the ML but > didn't see it go through). > > Any reason you're using `backtics` around your string? If you're just > trying to print to console, use 'single' or "double" quotes. If you're > trying to execute an external command, then that command needs to be > installed. > > Try it like this to just print to console: > >>puts 'bundle install' #using single quotes > > When I use backtics on my linux machine, this lists the contents of the > current working directory: > >>puts `ls` #using backtics indicates system command to execute > > Hope this helps, > Alex > > > Santhosh Kattissery wrote: >> I have the following line in my code: >> puts `bundle install` >> >> This gives me the following error: >> C:/../.rb:11:in ``': Exec format error - bundle install >> (Errno::ENOEXEC) >> >> Im using a windows machine. What could be wrong? >> Have anyone faced this issue? -- Posted via http://www.ruby-forum.com/.