Forum: RSpec Culerity Error while running feature.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Kaleem U. (Guest)
on 2009-02-22 12:23
Hi All,

I need your guide on an issue.

My Environment:

Window xp , Rails 2.2.2,  Rspec-rails 1.1.11, Rspec 1.1.11, Cucmber ,
Webrat,Culerity

I installed the jruby, sets its path in environment. It shows me Version
of jruby also.

Now the problem is when before installing
langalex-culerity(http://github.com/langalex/culerity/tree/master) my
cucumber and rspec are working fine.
Now i have to test my javascript and ajax and i installed cularity. When
i run "rake features". it gives me this error.




  Scenario: Log in               # features/manage_logins.feature:5
C:/Documents and Settings/Administrator/My
Documents/NetBeansProjects/1.4/vendor/gems/langalex-culerity-0.1.2/lib/culerity.rb
:7:in `popen': Exec format error - jruby C:/Documents and
Settings/Administrator/My Documents/NetBeansProjects/1.4/vendor/gem
s/langalex-culerity-0.1.2/lib/culerity.rb (Errno::ENOEXEC)
        from C:/Documents and Settings/Administrator/My
Documents/NetBeansProjects/1.4/vendor/gems/langalex-culerity-0.1.2/li
b/culerity.rb:7:in `run_server'
        from ./features/step_definitions/common_celerity.rb:2:in
`__cucumber_45721280'
        from
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/core_ext/proc.rb:48:in
`__send__'
        from
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/core_ext/proc.rb:48:in
`call_in'
        from
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:86:in
`execute_scenario'
        from
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:86:in
`each'
        from
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:86:in
`execute_scenario'
        from
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:75:in
`visit_scenario'
         ... 10 levels...
        from
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/cli.rb:13:in
`execute'
        from
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.1.16/bin/cucumber:6
        from c:/ruby/bin/cucumber:19:in `load'
        from c:/ruby/bin/cucumber:19


Thanks for your Help.

Regards,
Kaleem U.
Joaquin Rivera P. (Guest)
on 2009-02-22 15:07
(Received via mailing list)
hey Kaleem,
I am myself no expert on w$ but the line throwing the error is
  def self.run_server
    IO.popen("jruby #{__FILE__}", 'r+')
  end
are you able to run popen calls in w$ ? try your irb and see, if not
maybe
there's some w$ expert who can help

hope that helps
joaquin
Aslak H. (Guest)
on 2009-02-22 18:17
(Received via mailing list)
On Sun, Feb 22, 2009 at 1:42 PM, Joaquin Rivera P.
<removed_email_address@domain.invalid> wrote:
> hey Kaleem,
> I am myself no expert on w$ but the line throwing the error is
>   def self.run_server
>     IO.popen("jruby #{__FILE__}", 'r+')

When forking a new ruby interpreter, always use rbconfig:

require 'rbconfig'
ruby = File.join(Config::CONFIG['bindir'],
Config::CONFIG['ruby_install_name'])
IO.popen("#{ruby} #{__FILE__}", 'r+')

If you don't, you might end up running a different ruby than the one you
want.

Aslak
Joaquin Rivera P. (Guest)
on 2009-02-22 20:28
(Received via mailing list)
cool, I'll give that a try in short

thanks
joaquin

2009/2/22, aslak hellesoy <removed_email_address@domain.invalid>:
Kaleem U. (Guest)
on 2009-02-23 06:22
Let me try...
Thanks for your reply.....
This topic is locked and can not be replied to.