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
Hope this helps,
Alex
···
On Tue, 2010-06-08 at 13:50 -0500, Santhosh Kattissery wrote:
I have the following line in my code:
puts `bundle install`
This gives me the following error:
C:/../<abc>.rb:11:in ``': Exec format error - bundle install
(Errno::ENOEXEC)
Im using a windows machine. What could be wrong?
Have anyone faced this issue?
(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:/../<abc>.rb:11:in ``': Exec format error - bundle install
(Errno::ENOEXEC)
Im using a windows machine. What could be wrong?
Have anyone faced this issue?
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:/../<abc>.rb:11:in ``': Exec format error - bundle install
(Errno::ENOEXEC)
Im using a windows machine. What could be wrong?
Have anyone faced this issue?
Do you have the path to the executable listed in your $PATH environment
variable?
···
On Tue, 2010-06-08 at 14:53 -0500, Santhosh Kattissery wrote:
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:/../<abc>.rb:11:in ``': Exec format error - bundle install
>> (Errno::ENOEXEC)
>>
>> Im using a windows machine. What could be wrong?
>> Have anyone faced this issue?
Which version of ruby are you using? You may need to run something like:
puts `bundle.bat install`
HTH
Gordon
···
On Tue, Jun 8, 2010 at 2:53 PM, Santhosh Kattissery <santhosh214@gmail.com> wrote:
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 am facing similar issue and I do have $PATH variable setup in the
windows.
Basically, it happens, when I run cucumber features on culerity gem.
Error is:
(: failed steps (:
Exec format error -
C:/Ruby/lib/ruby/gems/1.8/gems/culerity-0.2.10/lib/../bin/run_celerity_server.rb
(Errno::ENOEXEC)
The only line in run_celerity_server.rb I could see is:
#!/usr/bin/env jruby
require File.dirname(__FILE__) << '/../lib/culerity/celerity_server'
Culerity::CelerityServer.new(STDIN, STDOUT)
Thanks in advance.
-Gourav
Alex Stahl wrote:
···
Do you have the path to the executable listed in your $PATH environment
variable?
I will give it a try, by the way, I am using ruby 1.8.6 and jruby 1.5.1
Gordon Thiesfeld wrote:
···
On Tue, Jun 8, 2010 at 2:53 PM, Santhosh Kattissery > <santhosh214@gmail.com> wrote:
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.
Which version of ruby are you using? You may need to run something
like:
It didn't work, any idea what may be going wrong here?
-Gourav
Gourav Tiwari wrote:
···
Thanks for the reply Gordon
I will give it a try, by the way, I am using ruby 1.8.6 and jruby 1.5.1
Gordon Thiesfeld wrote:
On Tue, Jun 8, 2010 at 2:53 PM, Santhosh Kattissery >> <santhosh214@gmail.com> wrote:
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.
Which version of ruby are you using? You may need to run something
like: